This book is primarily an introduction to the design of algorithms for problem solving.
Its prominent feature is to use a functional language as an implementation language.
Because of the high level of abstraction provided, functional programs tend to be shorter,
clearer and faster to develop than their imperative counterparts. This contributes to a
better understanding of the algorithm being implemented and makes it possible to
explore alternative solutions more rapidly. Although we believe that this is true for a
wide range of algorithms, the book also discusses the limitations of functional style in
dealing with certain problems.
This book is not about a particular functional language. The material is arranged
in the same way as in a classic algorithms book: it is a succession of chapters on
'traditional' topics such as sorting and searching algorithms. In addition, the choice
of a functional language permits the introduction of algorithm design strategies such
as divide-and-conquer and dynamic programming by means of higher-order functions.
New concepts such as process networks and parallel algorithms can also be introduced
in a non-conventional way. Due to this extra material, topics such as lower bound proofs
and N-P completeness theory are not covered.
The emphasis of the book is on intuitive and pragmatic program development tech-
niques. This is only a small step forward, as we believe that functional programming
provides a link between the study of algorithms and the study of correctness proofs and
systematic derivation from formal specifications. We are hoping that more publications
covering this area will emerge in the near future.
Another aim of this book is to provide a useful reference of functional programs
related to a variety of problems. Programmers will be able to choose (or adapt) a
functional program that is relevant to their problem as they already do with other
languages such as Fortran. Pascal or C. We are also hoping that this book will contribute
towards making functional languages more viable as a programming tool.