Table of Contents
Part I An introduction to Objective Caml
Chapter 1 The core language
1.1 Basics
1.2 Data types
1.3 Functions as values
1.4 Records and variants
1.5 Imperative features
1.6 Exceptions
1.7 Symbolic processing of expressions
1.8 Pretty-printing and parsing
1.9 Standalone Caml programs
Chapter 2 The module system
2.1 Structures
2.2 Signatures
2.3 Functors
2.4 Functors and type abstraction
2.5 Modules and separate compilation
Chapter 3 Objects in Caml
3.1 Classes and objects
3.2 Reference to self
3.3 Initializers
3.4 Virtual methods
3.5 Private methods
3.6 Class interfaces
3.7 Inheritance
3.8 Multiple inheritance
3.9 Parameterized classes
3.10 Using coercions
3.11 Functional objects
3.12 Cloning objects
3.13 Recursive classes
3.14 Binary methods
3.15 Friends
Chapter 4 Labels and variants
4.1 Labels
4.1.1 Optional arguments
4.1.2 Labels and type inference
4.1.3 Suggestions for labeling
4.2 Polymorphic variants
4.2.1 Weaknesses of polymorphic variants
Chapter 5 Advanced examples with classes and modules
5.1 Extended example: bank accounts
5.2 Simple modules as classes