OCaml is an industrial-strength programming language supporting functional, imperative and object-oriented styles

Learn Learn


Find out about OCaml, read about users, see code examples, go through tutorials and more.

Documentation Documentation


Install OCaml, look up package docs, access the Manual, get the cheat sheets and more.

Platform Platform


The OCaml Package Manager, gives you access to multiple versions of thousands of packages.

Community Community


Read the news feed, join the mailing lists, get support, attend meetings, and find OCaml around the web.



A taste of OCaml

(* Binary tree with leaves car­rying an integer. *)
type tree = Leaf of int | Node of tree * tree

let rec exists_leaf test tree =
  match tree with
  | Leaf v -> test v
  | Node (left, right) ->
      exists_leaf test left
      || exists_leaf test right

let has_even_leaf tree =
  exists_leaf (fun n -> n mod 2 = 0) tree

OCaml is a lot more powerful than this simple example shows. See more examples!


Package Version Date
safemoney0.1.0Sep 15, 2023
reason-react-ppx0.12.0Sep 14, 2023
reason-react0.12.0Sep 14, 2023
ocaml-system5.1.0Sep 14, 2023
ocaml-src5.1.0Sep 14, 2023
ocaml-base-compiler5.1.0Sep 14, 2023