Functional programming using Caml Light
This text is an introduction to functional programming in general and the
Caml Light language in particular. The table of contents is shown below.
You can retrieve and view individual chapters (in PDF). The whole manual is also available in PDF, DVI and Postscript.
I) Functional programming
- 2) Functional languages
- 2.1) History of functional languages
- 2.2) The ML family
- 2.3) The Miranda family
- 3) Basic concepts
- 3.1) Toplevel loop
- 3.2) Evaluation: from expressions to values
- 3.3) Types
- 3.4) Functions
- 3.5) Definitions
- 3.6) Partial applications
- 4) Basic types
- 4.1) Numbers
- 4.2) Boolean values
- 4.3) Strings and characters
- 4.4) Tuples
- 4.5) Patterns and pattern-matching
- 4.6) Functions
- 5) Lists
- 5.1) Building lists
- 5.2) Extracting elements from lists: pattern-matching
- 5.3) Functions over lists
- 6) User-defined types
- 6.1) Product types
- 6.2) Sum types
- 6.3) Summary
II) Caml Light specifics
III) A complete example