References

  • OCaml Programming: Correct + Efficient + Beautiful — Textbook for a course at Cornell; well-written and with embedded videos complementing the text. Good for looking up a particular concept.
  • UW CSE 341 Lecture Notes — The “reading notes” for each unit are well-written and introduce features of OCaml in the context of teaching a Programming Languages class.
  • OCaml from the Very Beginning — A fairly gentle introduction to the language. Available to purchase but also available in HTML and PDF format on that site.
  • OCaml from the Ground Up — Clear, but concise, explanations of many basic concepts of the OCaml language. They are written and presented well, but they may not be sufficient explanation for beginners on their own. Use this either as a starting point, moving to another resource for more, or as a clean reference for an idea after covering it elsewhere.
  • OCaml Operator Lookup — A very handy tool for looking up or learning about a particular operator in OCaml. Describes each clearly and concisely.
  • Real World OCaml — More focused on practical applications of OCaml than on teaching the language.

Coding

  • For trying out OCaml code in your browser, you can fork this template on Replit: OCaml. In that environment, you can run OCaml tools on the command line in the Shell (including the ocamlc compiler and utop, the top-level/REPL), or you can quickly compile and run code in main.ml using the Run button.