General-Purpose, Industrial-Strength, Expressive, and Safe
let square x = x * x
val square : int -> int = < fun >
square 3
- : int = 9
let rec fac x =
if x <= 1 then 1 else x * fac (x - 1)
val fac : int -> int = < fun >
fac 5
- : int = 120
square 120
- : int = 14400
Trusted by Industry Leaders
Unobtrusive Type Safety
Fast Compiler and Efficient Applications
First-Class Editor and Tooling
odoc
, an easy-to-use documentation generator, OCaml programmers have access to a complete, modern developer experience.
Vibrant Community
Users of OCaml
For Educators
For Industrial Users
Curated Resources
Getting Started
Install OCaml, set up your favorite text editor and start your first project.
Language Manual
Read the reference manual of the language and documentation on the compiler.
Books
What expert programmers and researchers are saying about OCaml, from the beginner level to more advanced topics.
Standard Library
Searchable API documentation.
Exercises
Learn OCaml by solving problems on a variety of topics, from easy to challenging.
Papers
Papers that have influenced OCaml and other functional programming languages.
OCaml Packages
Explore thousands of open-source OCaml packages with their documentation.
