Synopses & Reviews
A programming course should concentrate on a program's logical structure and design rather than on simply writing code. The functional approach to programming achieves this aim because logical concepts are evident and programs are transparent, and so can be written quickly and cleanly. In this book, the authors emphasize the notions of function and relate programming to familiar concepts from mathematics and logic. They introduce functional programming via examples but also explain what programs compute and how to reason about them. They show how the ideas can be implemented in the Caml language, a dialect of the ML family, and give examples of how complex programs from a variety of areas (such as arithmetic, tree algorithms, graph algorithms, text parsing and geometry) can be developed in close agreement with their specifications. Many exercises and examples are included throughout the book; solutions are also available. An appendix gives all the code used in the book in Standard ML.
Review
"...a valuable contribution to programming practice...Cousineau and Mauny convincingly demonstrate the elegance and conciseness of the functional approach." Computing Reviews
Synopsis
The authors introduce functional programming via examples and explain what programs compute and how to reason about them. They implement the ideas in Caml and in Standard ML, and give examples of how complex programs can be developed in close agreement with their specifications. Many exercises and examples are included throughout the book; solutions are also available.
Table of Contents
Introduction; Part I. Basic Principles: 1. Expressions; 2. Data structures; 3. Semantics; 4. Imperative aspects; Part II. Applications: 5. Exact arithmetic; 6. Formal terms, filtering, and unification; 7. Balanced trees; 8. Graphs and problem resolution; 9. Syntactic analysis; 10. Geometry and designs; Part III. Implementation: 11. Evaluation; 12. Compilation; 13. Types and typing; Appendix 1. Help for Caml Light 0.6; Appendix 2. How to Get Caml, MLgraph, and the examples; Bibliography; Index.