OCaml By Examples

Language Basics

Project Management

  • dune
  • dune-release
  • opam pin

Advanced Ocaml

  • functors
  • monads

Libraries

Utop

console

Utop is a universal interactive toplevel for OCaml.
$ opam install utop
$ utop

utop

You can use it to interatively experiment with code, load libraries and debug modules.
utop # let add_one i = i + 1;;
val add_one : int -> int = <fun>

utop # add_one 1;;
- : int = 2
next: Values