Your Help is Needed
Many of the tutorials below need updating and tutorials on
many new topics are needed. Please contribute by visiting this
project's repo on GitHub; you may
use the issue tracker there to request or offer new tutorials.
Learn by Doing
Try OCaml Online (by
OCamlPro) allows you to immediately start learning OCaml in your
page, it gives you the full power of OCaml, even when your are
disconnected from the network.
provides OCaml solutions to the complete set of problems
originally posed in the very successful Perl Cookbook. OCaml is
one of only 3 languages for which the full set of solutions has
is a programming chrestomathy site. It provides solutions to the
same task in many languages. Currently there are few tasks with
OCaml solutions provided, but perhaps you would like to add new
Tutorials on OCaml
System (by Inria) is the official user's manual. The first
part provides an introduction to the core language, objects and
classes, and modules. Previous versions are here.
Tutorial on the C API (by Florent Monnier) explains how to
write C stubs to call C functions from OCaml and back.
OCaml for scientific computation (by Thomas Fiscbacher),
covers a broad sample of OCaml, from the basics to the C api.
A Concise Introduction to OCaml (by David Matuszek)
gives a concise, yet broad, overview of the language and the
standard library. It is rather old but most of what it says
How to wrap C functions to OCaml (by Florent Monnier)
explains how to write extensions for OCaml in C in an
understandable way and features a lot of examples.
WikiBooks on OCaml
Tutorials on Tools
There are also tutorials that can be useful to learn how to use
popular tools and libraries.
Tutorial (by Jake Donham), to build syntax extensions for OCaml with Camlp4.
Tutorial, to build syntax extensions for OCaml with Camlp4.
Tutorial (by SooHyoung Oh), on how to create lexers using
ocamllex tool of the standard distribution.
Tutorial (by SooHyoung Oh), on how to create parsers using
ocamlyacc tool of the standard distribution.
2.0 Tutorial (by SooHyoung Oh), on how to create graphical
applications with the LablGTK library.
Coming From Another Language
These tutorials help learn OCaml from the perspective of being
familiar with another language.