🎉 Exercism Research is now launched. Help Exercism, help science and have some fun at research.exercism.io 🎉


Join the OCaml Track
OCaml is a functional and object-oriented language, used both in industry and as a teaching language to elegantly solve problems. The strong type system, with type inference, is useful for catching mistakes.
Join the OCaml Track
Track mentors

1 Mentor

Our mentors are friendly, experienced OCaml developers who will help teach you new techniques and tricks.
Track students

1,940 Students

Join hundreds of students who have enjoyed learning and improving their skills by taking this track.
Track exercises

44 Exercises

Hundreds of hours have gone into making these exercises fun, useful, and challenging to help you enjoy learning.

About OCaml

let rec fib = function
  | 0 -> 1
  | 1 -> 1
  | n -> fib (n - 1) + fib (n - 2)

OCaml is an industrial strength programming language supporting functional, imperative and object-oriented styles - but don't worry if you're not familiar with these, as it's used as a teaching language by a lot of institutions (including Cornell and Princeton).

One of the best features of OCaml is the rich and powerful type system - this is useful to catch some mistakes early on saving developers a huge amount of frustration. Also, type inference relieves developers from having to specify types in the code - the compiler will work these out for you!

It's used by Facebook (for static code analysis with Infer) and Jane Street (for providing strong guarantees for their internal trading systems), and has influenced the F# functional programming language and ReasonML.

Join the OCaml track

Exercism is a great website

Exercism is a great website where I was able to have some very interesting challenges.

Relaxed. Encouraging. Supportive.

Meet the OCaml Track mentors

Once you join the OCaml language track, you will receive support and feedback from our team of mentors. Here are the bios of a few of the mentors of this track.

Avatar of Stephen Bastians

Stephen Bastians https://github.com/stevejb71

I like OCaml's approach of being functional first, but allowing for escape hatches into imperative code when you really need them.
Fun. Challenging. Interesting

Community-sourced OCaml exercises

These are a few of the 44 exercises on the OCaml track. You can see all the exercises here.

Difference Of Squares
dynamic programming
Beer Song
Run Length Encoding
Passionate. Knowledgeable. Creative.

Meet the OCaml Track maintainers

The OCaml Maintainers are the brains behind the OCaml Track. They spend their spare time creating interesting and challenging exercises that we can all learn from. We are incredibly grateful for their hard work. Here are the bios of a few of the maintainers of this track.

Avatar of Simon Shine

Simon Shine https://simonshine.dk

I've been a classroom teacher in compilers and various functional languages for five years. Having pure functions and isolation of side-effects are fundamental to separation of concerns. Strong, static types, type inference and algebraic types are hard for me to live without.
Avatar of Stephen Bastians

Stephen Bastians

I like OCaml's approach of being functional first, but allowing for escape hatches into imperative code when you really need them.

Get started with the OCaml track. As with everything on Exercism, it's 100% free!

Join the OCaml Track