Programming in Haskell / Edition 1

Paperback (Print)
Rent from
(Save 75%)
Est. Return Date: 07/24/2015
Used and New from Other Sellers
Used and New from Other Sellers
from $32.95
Usually ships in 1-2 business days
(Save 49%)
Other sellers (Paperback)
  • All (20) from $32.95   
  • New (13) from $42.98   
  • Used (7) from $32.95   


Haskell is one of the leading languages for teaching functional programming, enabling students to write simpler and cleaner code, and to learn how to structure and reason about programs. This introduction is ideal for beginners: it requires no previous programming experience and all concepts are explained from first principles via carefully chosen examples. Each chapter includes exercises that range from the straightforward to extended projects, plus suggestions for further reading on more advanced topics. The author is a leading Haskell researcher and instructor, well-known for his teaching skills. The presentation is clear and simple, and benefits from having been refined and class-tested over several years. The result is a text that can be used with courses, or for self-learning. Features include freely accessible Powerpoint slides for each chapter, solutions to exercises and examination questions (with solutions) available to instructors, and a downloadable code that's fully compliant with the latest Haskell release.
Read More Show Less

Editorial Reviews

From the Publisher
'The best introduction to Haskell available. There are many paths towards becoming comfortable and competent with the language but I think studying this book is the quickest path. I urge readers of this magazine to recommend Programming in Haskell to anyone who has been thinking about learning the language.' Duncan Coutts, Monad Reader

'Two groups of people must consider this book. The first is professors interested in rapidly introducing students to fundamental concepts in functional programming. This book, supplemented with online resources and professorial guidance could easily serve as the textbook for a semester-long course on functional programming. The second group is programmers interested in surveying the functional paradigm as quickly as possible.' Journal of Functional Programming

Read More Show Less

Product Details

  • ISBN-13: 9780521692694
  • Publisher: Cambridge University Press
  • Publication date: 1/28/2007
  • Edition description: New Edition
  • Edition number: 1
  • Pages: 183
  • Sales rank: 1,279,071
  • Product dimensions: 6.85 (w) x 9.72 (h) x 0.47 (d)

Meet the Author

Graham Hutton is Professor of Computer Science at the University of Nottingham, where he co-leads the Functional Programming Laboratory.
Read More Show Less

Table of Contents

Preface     xi
Introduction     1
Functions     1
Functional programming     2
Features of Haskell     4
Historical background     6
A taste of Haskell     6
Chapter remarks     9
Exercises     9
First steps     10
The Hugs system     10
The standard prelude     10
Function application     12
Haskell scripts     13
Chapter remarks     16
Exercises     16
Types and classes     17
Basic concepts     17
Basic types     18
List types     20
Tuple types     20
Function types     21
Curried functions     21
Polymorphic types     23
Overloaded types     23
Basic classes     24
Chapter remarks     28
Exercises     28
Defining functions     30
New from old     30
Conditional expressions     31
Guarded equations     31
Pattern matching     32
Lambda expressions     34
Sections     36
Chapter remarks     36
Exercises     37
List comprehensions     38
Generators     38
Guards     39
The zip function     40
String comprehensions     41
The Caesar cipher     42
Chapter remarks     46
Exercises     46
Recursive functions     48
Basic concepts     48
Recursion on lists     49
Multiple arguments     52
Multiple recursion     53
Mutual recursion     53
Advice on recursion     55
Chapter remarks     59
Exercises     59
Higher-order functions     61
Basic concepts     61
Processing lists     62
The foldr function     64
The foldl function     66
The composition operator     68
String transmitter     69
Chapter remarks     72
Exercises     72
Functional parsers     74
Parsers     74
The parser type     75
Basic parsers     75
Sequencing      76
Choice     78
Derived primitives     78
Handling spacing     81
Arithmetic expressions     82
Chapter remarks     85
Exercises     85
Interactive programs     87
Interaction     87
The input/output type     88
Basic actions     88
Sequencing     89
Derived primitives     90
Calculator     91
Game of life     94
Chapter remarks     97
Exercises     97
Declaring types and classes     99
Type declarations     99
Data declarations     100
Recursive types     102
Tautology checker     105
Abstract machine     109
Class and instance declarations     111
Chapter remarks     114
Exercises     114
The countdown problem     116
Introduction     116
Formalising the problem     117
Brute force solution     119
Combining generation and evaluation     120
Exploiting algebraic properties     121
Chapter remarks      123
Exercises     123
Lazy evaluation     124
Introduction     124
Evaluation strategies     125
Termination     128
Number of reductions     129
Infinite structures     130
Modular programming     132
Strict application     134
Chapter remarks     137
Exercises     137
Reasoning about programs     139
Equational reasoning     139
Reasoning about Haskell     140
Simple examples     141
Induction on numbers     142
Induction on lists     145
Making append vanish     146
Compiler correctness     150
Chapter remarks     154
Exercises     154
Standard prelude     156
Classes     156
Logical values     157
Characters and strings     158
Numbers     159
Tuples     160
Maybe     160
Lists     160
Functions     164
Input/output     164
Symbol table     166
Bibliography     167
Index      169
Read More Show Less

Customer Reviews

Average Rating 3.5
( 2 )
Rating Distribution

5 Star


4 Star


3 Star


2 Star


1 Star


Your Rating:

Your Name: Create a Pen Name or

Barnes & Review Rules

Our reader reviews allow you to share your comments on titles you liked, or didn't, with others. By submitting an online review, you are representing to Barnes & that all information contained in your review is original and accurate in all respects, and that the submission of such content by you and the posting of such content by Barnes & does not and will not violate the rights of any third party. Please follow the rules below to help ensure that your review can be posted.

Reviews by Our Customers Under the Age of 13

We highly value and respect everyone's opinion concerning the titles we offer. However, we cannot allow persons under the age of 13 to have accounts at or to post customer reviews. Please see our Terms of Use for more details.

What to exclude from your review:

Please do not write about reviews, commentary, or information posted on the product page. If you see any errors in the information on the product page, please send us an email.

Reviews should not contain any of the following:

  • - HTML tags, profanity, obscenities, vulgarities, or comments that defame anyone
  • - Time-sensitive information such as tour dates, signings, lectures, etc.
  • - Single-word reviews. Other people will read your review to discover why you liked or didn't like the title. Be descriptive.
  • - Comments focusing on the author or that may ruin the ending for others
  • - Phone numbers, addresses, URLs
  • - Pricing and availability information or alternative ordering information
  • - Advertisements or commercial solicitation


  • - By submitting a review, you grant to Barnes & and its sublicensees the royalty-free, perpetual, irrevocable right and license to use the review in accordance with the Barnes & Terms of Use.
  • - Barnes & reserves the right not to post any review -- particularly those that do not follow the terms and conditions of these Rules. Barnes & also reserves the right to remove any review at any time without notice.
  • - See Terms of Use for other conditions and disclaimers.
Search for Products You'd Like to Recommend

Recommend other products that relate to your review. Just search for them below and share!

Create a Pen Name

Your Pen Name is your unique identity on It will appear on the reviews you write and other website activities. Your Pen Name cannot be edited, changed or deleted once submitted.

Your Pen Name can be any combination of alphanumeric characters (plus - and _), and must be at least two characters long.

Continue Anonymously
Sort by: Showing all of 2 Customer Reviews
  • Anonymous

    Posted September 12, 2012

    No text was provided for this review.

  • Anonymous

    Posted February 12, 2009

    No text was provided for this review.

Sort by: Showing all of 2 Customer Reviews

If you find inappropriate content, please report it to Barnes & Noble
Why is this product inappropriate?
Comments (optional)