Enter your mobile number or email address below and we'll send you a link to download the free Kindle Reading App. Then you can start reading Kindle books on your smartphone, tablet, or computer - no Kindle device required.

There is a newer edition of this item:

The second edition of Haskell: The Craft of Functional Programming is essential reading for beginners to functional programming and newcomers to the Haskell programming language. The emphasis is on the process of crafting programs and the text contains many examples and running case studies, as well as advice on program design, testing, problem solving and how to avoid common pitfalls.

Editorial Reviews

From the Back Cover

PROGRAMMING LANGUAGES / FUNCTIONAL PROGRAMMING / HASKELL

HaskellThe Craft of Functional Programming Second Edition

Simon Thompson

The second edition of Haskell: The Craft of Functional Programming is essential reading for beginners to functional programming and newcomers to the Haskell programming language. The emphasis is on the process of crafting programs and the text contains many examples and running case studies, as well as advice on program design, testing, problem solving and how to avoid common pitfalls.

Building on the strengths of the first edition, the book includes many new and improved features:· Complete coverage of Haskell 98, the standard version of Haskell which will be stable and supported by implementations for years to come.· An emphasis on software engineering principles, encouraging a disciplined approach to building reusable libraries of software components.· Detailed coverage of the Hugs interpreter with an appendix covering other implementations.· A running case study of pictures emphasizes the built-in functions which appear in the standard prelude and libraries. It is also used to give an early preview of some of the more complex language features, such as higher-order functions. · List comprehensions and the standard functions over lists are covered before recursion.· Early coverage of polymorphism supporting the `toolkit' approach and encouraging the reuse of built-in functions and types.· Extensive reference material containing details of further reading in books, journals and on the World Wide Web.· Accompanying Web Site supporting the book, containing all the program code, further teaching materials and other useful resources.

About the authorSimon Thompson is a Senior Lecturer in the Computing Laboratory at the University of Kent. His research and teaching interests include functional programming and logical aspects of computer science. Simon has written two other books: Miranda: The Craft of Functional Programming and Type Theory and Functional Programming.

About the Author

Simon Thompson is a Senior Lecturer in Computer Science at the University of Kent. His research and teaching interests include functional programming and logical aspects of computer science.

Most Helpful Customer Reviews

Most of the reviewers for this text so far seem to be more experienced programmers or computer scientists. So I am writing this review to give a different perspective.

My uni has this year chosen Haskell as the INTRODUCTORY language, apparently because it:

1) Is a clear implementation of some fundamental programming concepts

2) Puts everyone on an equal footing, since no-one is likely to have studied it (or even another functional language) before.

I have little formal background but have been messing around with scripting languages like TCL for a couple of years.

The initial transition to thinking from a functional perspective seemed very difficult. The idea of recursion as opposed "just sticking it in a loop" took a while to stick.

But I have found simply by working through the book I have progressed quickly and in only a few weeks it has become quite natural to think in a Haskell way.

I attribute this to the excellent layout of the book, but more importantly the frequent exercises provided throughout each chapter. As my lecturer is fond of saying, practice is the only way to learn programming, and it is by exploring the introduced concepts in this way that I feel my learning of Haskell has been most effective.

The book is paced, if anything, a little slowly. But since I am someone who likes to gain a thorough understanding of topics I don't mind this. The exercises themselves are well thought out and tend to offer an increasing amount of challenge. Something that conceptually seems trivial can be given an interesting twist when it comes to writing a function.Read more ›

I read this book as my first book towards learning functional programming and Haskell specifically. With many years of (imperative and object oriented) software engineering behind me, the concept of functional programming was interesting.The good parts of this book are that it is extremely well organized. It includes many helpful exercises (which I highly recommend) and a very good introduction (the first ten or dozen chapters).Later on in the book, however, I found increasing difficulty. The author picks up the pace of the material without, in my opinion, justification. By the end, he covers what, from reading several other books and many online articles, I consider the most confusing topic in a single chapter or two. Reading it several times, I'm still uncertain how to build an I/O intensive program in Haskell, and/or what a Monad truly is and/or how exception processing is properly handled.That notwithstanding (because it seems to be a fairly common complaint of new Haskell students) I quite enjoyed the book. Before you buy it, though, you may wish to consider books from Paul Hudak (a Yale professor and nice guy) and Richard Bird, both of whom have written on Haskell; Paul actually taught a class which I avoided back in the early 90s - too bad, too, because then I wouldn't have to start from scratch so many years later.

This was my first text on Haskell, and it certainly got me up to speed on all the essential elements. I prefer Hudaks text for most things, but there is no good reason not to own every Haskell book you can get your hands on. This book is especially strong on learning how to prove things about programs.It doesnt get to Monads until near the end, but perhaps that is a good thing. It depends on what you want out of a text.I used this text for self study, and it is well suited to such a task.

This book, in conjunction with other resources, is a good introduction to Haskell. [...] has a lot of guidance as well.

If you are like me and you are learning Functional Programming after many years of other styles of programming Haskell can be daunting. Books like this explain things from the fundamental levels to more advanced levels. If you read the introduction to the book you will see that it is natural to skip around chapter to chapter when it becomes appropriate to do so. Deciding when it's appropriate is going to depend on your goals. If you want to write full-blown applications in Haskell you may find yourself skipping around much earlier than someone who wants to cover the language completely.

Overall I find this to be a very good book but some of the exercises can be very difficult for someone new to Functional Programming. Almost anything worth doing is not easy though :).

This is a dull university textbook meant to instruct tender young minds in the philosophy of functional programming, and several of the chapters are on topics that are not likely to be of interest to anyone who isn't using the book as the required text for a course. There is insufficient reference material on the built-in functions and the functions in the language's standard prologue for this book to stand on its own.

The author has an annoying habit of using haskell-like pseudocode to explain ideas, without making it clear what is pseudocode and what is real, working code. In addition, the lines of code are interspersed with the text, making it unclear what would constitute a complete, compilable source code file. For example, the discussion of memoization leads off with the standard example of memoizing the naive recursive implementation of the Fibonacci function. First he gives an example of how to memoize it that he clearly marks as not real code that would compile. Then he gives another example that seems to be the one that he is saying would actually compile, but it doesn't compile either. There is no working version of the code on the book's web site, either. After this, he passes on to another example.

More About the Author

Simon Thompson is Professor of Logic and Computation in the School of Computing at the University of Kent, where he has taught computing at undergraduate and postgraduate levels for the past thirty years, and was department head from 2002 to 2010; he is now Director for Research and Enterprise for the school.

His research work has centered on functional programming: program verification, type systems, and most recently development of software tools for functional programming languages. His team has built the HaRe tool for refactoring Haskell programs, and is currently developing Wrangler to do the same for Erlang. His research has been funded by various agencies including EPSRC and the European Framework programme. His training is as a mathematician: he has an MA in Mathematics from Cambridge and a D.Phil. in mathematical logic from Oxford.

He has written four books in his field of interest; Type Theory and Functional Programming published in 1991; Miranda: The Craft of Functional Programming (1995), Haskell: The Craft of Functional Programming (3rd ed. 2011) and Erlang Programming (with Francesco Cesarini, 2009). Apart from the last, which is published by O'Reilly, these are all published by Addison Wesley.