OCaml Beginner Course

Duration: 3 to 5 days

This course has been designed by the OCamlPro team to enable developers to build upon their experience of other programming languages, such as C, C++, Python, C# or Java, to program confidently in OCaml. This covers all the main aspects of the OCaml language and tools and interleaves theory and practice. Depending on the duration and the customer needs, we can focus more on specific topics and design suitable learning projects.


  • Discover functional programming in OCaml

  • Modelize real-world data in OCaml types

  • Use the OCaml environment in a production context

  • Read and write OCaml code

  • Understand the architecture of OCaml applications


Presentation of OCaml

  • History of OCaml

  • OCaml Ecosystem

Setting up an OCaml environment

  • The OCaml distribution

  • The OPAM package installer

  • Editor modes for OCaml

OCaml develpment tools

  • The OCaml toplevel

  • The OCaml compilers

Language bases

  • Predefined types and simple values

  • Functions and recursivity

  • OCaml Imperative programming

  • Modules and Functors

  • Exceptions management

Type-driven programming

  • Polymorphism and parametric types

  • Variants and records

  • Pattern-matching

OCaml Standard Libraries

  • Basic modules

  • Containers

  • Input and Output

More OCaml tools

  • Libraries and packing

  • Preprocessing: camlp4 and ppx

  • Lexer and Parser generators

Overview of OCaml extensions

  • Polymorphic variants

  • Objects and classes

Course Prerequisites

The course assumes the knowledge of another programming language, so that basic programming paradigms are known. No prior knowledge of OCaml or functional programming s required.

Participants are expected to have a computer access during the course (Linux, Mac OS X or Windows), an easy-to-install OCaml archive will be provided before the course to setup a minimal but productive environment.


The course is half theory, half practice. Participants will have to write and adapt simple applications in OCaml, to build and test them.


OCamlPro can organize this course on-site in your company, by groups of about 10 participants. Content can be customized to better fit your needs. Contact us at contact@ocamlpro.com.