Learning

Why OCaml?

Beginner

Advanced

Polymorphism

Monads

Articles

Best Practices

See best-practices

Exercises

Books

  • Real World OCaml by Y. Minsky, A. Madhavapeddy and J. Hickey - Functional programming for the masses. The latest, and arguably the most readable book on OCaml. Note that the book uses only Jane Street libraries, but the material can be applied to other libraries.
      • RWO-lwt: translating the Async code examples from Real World OCaml to lwt.
  • More OCaml: Algorithms, Methods, and Diversions – In More OCaml John Whitington takes a meandering tour of functional programming with OCaml, introducing various language features and describing some classic algorithms. The book ends with a large worked example dealing with the production of PDF files. There are questions for each chapter together with worked answers and hints.
  • How to Think Like a (Functional) Programmer by Allen Downey and Nicholas Monje – How to Think Like a Computer Scientist is an introductory programming textbook based on the OCaml language. It is a modified version of Think Python by Allen Downey. It is intended for newcomers to programming and also those who know some programming but want to learn programming in the function-oriented paradigm, or those who simply want to learn OCaml.
  • OCaml from the Very Beginning by J. Whitington - OCaml from the Very Beginning will appeal both to new programmers, and experienced programmers eager to explore functional languages such as OCaml.
  • Pearls of Functional Algorithm Design by Richard Bird - It summaries 30 hard algorithm problems in function programming world. Although it is for Haskell, the algorithm problems are very interesting and trying to solve them in OCaml also helps the thinking of functional programming. Partial solutions in OCaml are here.
  • Unix System Programming in OCaml by X. Leroy and D. Rémy – Introduction to Unix system programming, with an emphasis on communications between processes.
  • Using, Understanding, and Unraveling OCaml – This book describes both the OCaml language and the theoretical grounds behind its powerful type system.
  • Purely Functional Data Structures: A classic book focusing on various data structures in the functional programming world. Can be very useful for understanding functional data structures, though OCaml obviously supports imperative data structures as well.
  • OCaml for Scientists - by Jon Harrod.

Online Courses

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License