"An Introduction to Computing with Haskell" by Manuel M. T. Chakravarty and Gabrielle C. Keller, Pearson SprintPrint, 2002, ISBN 1 74009 404 2
Abstract
The soft cover text An Introduction to Computing with Haskell with thirteen chapters, two appendices and an index on 145 pages of A4 is published on a 'print-on-demand' basis and available directly from the publishers in Sydney (at least in the sense that neither of the two large University bookshops I rang in Brisbane was able to find the book on their databases).Derived from lecture notes used in an introductory course at the University of New South Wales this book is attractively priced by Australian standards.At $AU 39.95 it retails for just slightly more than half the price of its nearest competitors.The relatively low price and a steering theme which embraces the elements and process of mathematical program analysis and reasoning are its distinguishing features.By the time they are finished, attentive readers should have soaked up a strong basis for a rational approach to computer programming and software design.In the words of the authors, the book sets out to introduce an 'absolute beginner' to computing including 'fundamental concepts of programming and simple forms of reasoning about programs'.That introduction mainly takes place in the computer programming language Haskell running under the Unix operating system.In pursuit of their aim Chakravarty and Keller eschew the usual heavy theory and dogma surrounding programming models in favour of a pedagogical framework composed of basic definitions built on informal discussion of some important ideas in programming.For example, the novice computer programmer is introduced to the idea and benefits of types as categories of values but doesn't have to grapple with category theory.Likewise, input and output are introduced as sequenceable actions expressed within the lazy paradigm of Haskell by the do notational idiom, but the theory of monoids and monads is ignored.Science does assume a fundamental role, however, as the student is quickly shown how to reason mathematically about program correctness and complexity through tools such as structural induction, the O notation and recurrence relations.Discussion around the main theme of this book is supported by a series of toy example programs, the most substantial of which are a video store database, a supermarket pricing program, a computer programming assignment auto-tester and an arithmetic expression evaluator.The auto-tester is a Unix shell script; the remaining examples being presented in Haskell.Exercises at the end of each chapter build on those examples and other issues.The GHCi compiler is also quickly introduced to the reader as a vehicle for Haskell programming.Let's turn now to a lecturer's check-list of the material covered (not in chapter order).Apart from the obligatory introduction and two chapters briefing the reader on Unix operating system basics and history, there are chapters covering types, control structures, recursion and input and output.Lists, higher order functions, user-defined data types, and tree structures fill out the remaining bread and butter chapters.There are also more advanced chapters on modularization and program decomposition, formal reasoning and work complexity.The chapter on trees covers sorted binary trees, AVL trees and tries.Another chapter introduces complexity analysis by developing the use of O notation through a discussion of that classic trio of sorting algorithms -insertion, merge and quicksort.