Learn Programming with OCaml
Points and comments are a snapshot, not live.
A free, openly-licensed book teaches programming using the OCaml language.
An English translation of a French OCaml textbook, by Sylvain Conchon and Jean-Christophe Filliâtre, translated by Urmila Nair and funded by the OCaml Software Foundation. Available as a free PDF (1.9 MB) and EPUB (2.3 MB) under CC BY SA 4.0. Code and error reporting are provided.
What commenters are saying
Many commenters push back on the idea that LLMs make learning programming languages irrelevant. Several argue that learning OCaml specifically changes how one thinks about programming and formal verification. A common thread is that understanding code is necessary to use LLMs effectively. One commenter recommends Cornell's CS 3110 course materials. Another suggests that OCaml's type system makes it a good partner for LLM-generated code.