Apr 26, 2025
athens.ml and berlin.ml, define modules Athens and Berlin respectively.dune-project file for project-wide configuration and a dune file for build directives.opam exec -- dune build and opam exec -- dune exec ./berlin.exe commands are used to compile and execute.ModuleName.definition and can be opened to bring definitions into scope.open to bring module definitions into scope, but be cautious of conflicts (e.g., don't open List).Stdlib is opened by default.let open ... in for local scope..mli files to define module interfaces, restricting the default interface.cairo.ml and cairo.mli demonstrate private definitions.exeter.mli and exeter.ml illustrate these concepts with types aleph, bet, gimel, and dalet.florence.ml and glasgow.ml.florence.ml with HelloType module type.ocamlc to display a module's interface.ocaml-print-intf tool can also be used.include directive allows adding functions to existing modules.uncons function to List module in extlib.ml.Random module.Random.get_state and Random.set_state provide access to the state.