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

Learn Learn

Learn

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

Documentation Documentation

Documentation

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

Platform Platform

Packages

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

Community Community

Community

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

News RSSRSS

More...

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!

Packages

Package Version Date
safepass 1.3 Jul 25, 2014
ox 1.1.1 Jul 24, 2014
frenetic 3.1.0 Jul 24, 2014
apron 0.9.10 Jul 23, 2014
mirage-net-xen 1.1.2 Jul 23, 2014
ppx_deriving 0.1 Jul 23, 2014