Concept Index

Find examples by the OCaml concept you want to learn.

Concept Examples
Accumulators bst.ml, mergesort.ml
Algebraic data types bst.ml, graph.ml, heap.ml
Benchmarking fibonacci.ml
BFS / DFS graph.ml
Closures fibonacci.ml, parser.ml
Cycle detection graph.ml
Hash tables & mutability fibonacci.ml, graph.ml
Higher-order functions mergesort.ml, hello.ml, heap.ml
Input validation factor.ml
Let bindings & type inference hello.ml
Memoization fibonacci.ml
Modules & functors graph.ml
Mutual recursion factor.ml
Option types list_last_elem.ml, bst.ml, graph.ml
Pattern matching list_last_elem.ml, bst.ml, factor.ml, graph.ml
Pipe operator (|>) hello.ml
Polymorphism ('a) bst.ml, mergesort.ml, heap.ml
Recursion All files
Record types graph.ml
Tail recursion mergesort.ml, fibonacci.ml
Topological sort graph.ml
Custom comparators mergesort.ml, heap.ml
Persistent data structures heap.ml
Priority queues / heaps heap.ml
Rank annotations heap.ml
Tuple destructuring mergesort.ml, hello.ml
Monadic composition (bind) parser.ml
Parser combinators parser.ml
Recursive descent parsing parser.ml
Operator precedence parser.ml

External Resources

Continue learning with these community resources: