This book teaches the fundamentals of programming using OCaml, assuming little prior knowledge of computer programming. Particular emphasis is placed upon programming paradigms rarely seen in current scientific computing, such as exceptions, polymorphism, higher-order functions, nested functions, pattern matching and modules.

Objsize is a small OCaml library for computing size of OCaml values. It computes count of words used for values, count of values' headers, maximal depth of values. There are functions to get size of values in bytes too.