Previous Contents Next

Chapter Outline

Section 1 illustrates Objective CAML modules on the example of the Stack module from the standard library, and develops an alternate implementation of this module with the same interface. Section 2 introduces the module language of Objective CAML in the case of simple modules, and shows some of its uses. In particular, we discuss type sharing between modules. Section 3 covers parameterized modules, which are called functors in Objective CAML. Finally, section 4 develops an extended example of modular programming: managing bank accounts with multiple views (the bank, the customer) and several parameters.


Previous Contents Next