Skip to content
Breakpoint logobreakpoınt

Learn-OCaml

Solve OCaml exercises in a web editor with a built-in toplevel and lessons

Most of the 141 exercises on the public instance (its exercise index on 30 November 2026) come out of university teaching. The biggest block, 59 by Simão Melo de Sousa, covers types and errors, calculations and recursion, and lists and vectors. The 37 from the Introduction to Functional Programming MOOC go week by week from integer and string identifiers through tries, first-class functions, exceptions, arrays and module signatures, then close with two projects: a Klotski solver and a random text generator. One week-five exercise is titled Unraveling the Automatic Grader.

Play on ocaml-sf.org

Free · Browser · Beginner

Screenshot of Learn-OCaml

About Learn-OCaml

Every exercise carries one to three stars. Hugo Férée's 20 are the gentlest way in, starting with local declarations and booleans, while all 25 of François Pottier's advanced problems sit at three stars, with titles such as Alpha-Beta Search and Breaking a Sort.

In a Hacker News thread about the demo (203 points), several commenters said it drills rather than teaches. One found an early exercise closer to a maths puzzle than a lesson. Others noted that it assumes you are following another resource, and one explained that the framework was built to accompany lectures.

OCamlPro wrote the platform between 2015 and 2018 on top of the older Try OCaml, using js_of_ocaml to run OCaml in the browser.

Questions about Learn-OCaml

Can a teacher run Learn-OCaml for a class?

Yes, the documentation covers deploying your own instance with Docker or as a static site, writing exercises and classifying students' answers.

Can I contribute an exercise to the public set?

Yes, the project home page lists a how-to on submitting an exercise to the global corpus.

Made this game? Claim it →

Keyboard shortcuts

j / k
Move down / up the list (this page)
] / [
Next / previous page
o
Open the focused game
b
Save or unsave the focused game
/
Search (the home list, or the command palette elsewhere)
Ctrl K
Command palette: games, skills, pages (works even when single keys are off)
?
This help