Books on OCaml

What experts programmers and researchers are saying about OCaml, from the beginner level to the more advanced topics.

15+ OCaml Books

More OCaml: Algorithms, Methods & Diversions

John Whitington

In "More OCaml" John Whitington takes a meandering tour of functional programming with OCaml, introducing various language features and describing some classic algorithms. The book ends with a large worked example dealing with the production of PDF files. There are questions for each chapter together with worked answers and hints.

"More OCaml" will appeal both to existing OCaml programmers who wish to brush up their skills, and to experienced programmers eager to explore functional languages such as OCaml. It is hoped that each reader will find something new, or see an old thing in a new light. For the more casual reader, or those who are used to a different functional language, a summary of basic OCaml is provided at the front of the book.

Real World OCaml

Yaron Minsky, Anil Madhavapeddy, Jason Hickey

Learn how to solve day-to-day problems in data processing, numerical computation, system scripting, and database-driven web applications with the OCaml multi-paradigm programming language. This hands-on book shows you how to take advantage of OCaml’s functional, imperative, and object-oriented programming styles with recipes for many real-world tasks.

You’ll start with OCaml basics, including how to set up a development environment, and move toward more advanced topics such as the module system, foreign-function interface, macro language, and the OCaml tools. Quickly learn how to put OCaml to work for writing succinct and readable code.

OCaml From the Very Beginning

John Whitington

In OCaml from the Very Beginning, John Whitington takes a no-prerequisites approach to teaching a modern general-purpose programming language. Each small, self-contained chapter introduces a new topic, building until the reader can write quite substantial programs. There are plenty of questions and, crucially, worked answers and hints.

OCaml from the Very Beginning will appeal both to new programmers, and experienced programmers eager to explore functional languages such as OCaml. It is suitable both for formal use within an undergraduate or graduate curriculum, and for the interested amateur.

Think OCaml: How to Think Like a Functional Programmer

Nicholas Monje, Allen Downey

This book is a work in progress. It is an introductory programming textbook based on the OCaml language. It is a modified version of Think Python, by Allen Downey. It is intended for newcomers to programming and also those who know some programming but want to learn programming in the function-oriented paradigm, or those who simply want to learn OCaml.

OCaml for Scientists

Jon D. Harrop

This book teaches OCaml programming with special emphasis on scientific applications. Many examples are given, covering everything from simple numerical analysis to sophisticated real-time 3D visualisation using OpenGL. This book contains over 800 color syntax-highlighted source code examples and dozens of diagrams that elucidate the power of functional programming to explain how lightning-fast and yet remarkably-simple programs can be constructed in the OCaml programming language.

Initiation à la programmation fonctionnelle en OCaml

Mohammed-Said Habet

La programmation fonctionnelle est un style de programmation qui consiste à considérer les programmes informatiques comme des fonctions au sens mathématique du terme. Ce style est proposé dans de nombreux langages de programmation anciens et récents comme OCaml.

Le but de ce livre est d’initier le lecteur au style fonctionnel de programmation en utilisant le langage OCaml. Cet ouvrage s’adresse donc principalement aux débutants en informatique. Il peut également être l’occasion pour les initiés de découvrir le langage de programmation OCaml.

Le lecteur trouvera une présentation progressive des concepts de programmation fonctionnelle dans le langage OCaml, illustrée par des exemples, de nombreux exercices corrigés et d’autres laissés à l’initiative du lecteur.

Apprendre à programmer avec OCaml

Jean-Christophe Filliâtre, Sylvain Conchon

Computer programming is hard to learn. Being a skillful programmer requires imagination, anticipation, knowledge in algorithmics, the mastery of a programming language, and above all experience, as difficulties are often hidden in details. This book synthesizes our experience as teachers and programmers.

The programming style is essential. Given a programming language, the same algorithm can be written in multiple ways, and some of them can be both elegant and efficient. This is what the programmer must seek at all costs and the reason why we choose a programming language for this book rather than pseudo-code. Our choice is OCaml.

This book is organized into three parts. The first one introduces OCaml and targets beginners, being they programming beginners or simply new to OCaml. Through small programs, the reader is introduced to fundamental concepts of programming and of OCaml. The second and third parts are dedicated to fundamental concepts of algorithmics and should allow the reader to write programs in a structured and efficient way. Algorithmic concepts are directly presented in the syntax of OCaml and any code snippet from the book is available online.

Programmation de droite à gauche et vice-versa

Pascal Manoury

Apprentissage de la programmation avec OCaml

Catherine Dubois, Valérie Ménissier Morain

Programming is a discipline by which the strengths of computers can be harnessed: large amounts of reliable memory, the ability to execute repetitive tasks relentlessly, and a high computation speed. In order to write correct programs that fulfill their specified needs, it is necessary to understand the precise semantics of the programming language. This book is targeted towards beginner programmers and provides teaching material for all programmers wishing to learn the functional programming style. The programming features introduced in this book are available in all dialects of the ML language, notably Caml-Light, OCaml and Standard ML. The concepts presented therein and illustrated in OCaml easily transpose to other programming languages.

Développement d'applications avec Objective Caml

Emmanuel Chailloux, Pascal Manoury, Bruno Pagano

A comprehensive (742 pages) book on OCaml, covering not only the core language, but also modules, objects and classes, threads and systems programming, and interoperability with C.

"Objective CAML est un langage de programmation : un de plus dira-t-on ! Ils sont en effet déjà nombreux et pourtant il en apparaît constamment de nouveaux. Au delà de leurs disparités, la conception et la genèse de chacun d'eux procèdent d'une motivation partagée : la volonté d'abstraire"

Introduzione alla programmazione funzionale

Carla Limongelli, Marta Cialdea

OCaml: Programação Funcional na Prática

Andrei de Araújo Formiga

This book is an introduction to functional programming through OCaml, with a pragmatic focus. The goal is to enable the reader to write real programs in OCaml and understand most of the open source code written in the language. It includes many code examples illustrating the topics and a few larger projects written in OCaml that showcase the integration of many language features. These larger programs include a set of interpreter, compiler and stack machine for a simple language, and a decision tree learning program for data analysis.

入門OCaml ~プログラミング基礎と実践理解~

OCaml-Nagoya

プログラミング in OCaml ~関数型プログラミングの基礎からGUI構築まで~

A. Igarashi (五十嵐 淳)

OCaml语言编程基础教程

G. Chen