Update cookies preferences

Thinking Functionally with Haskell [Paperback / softback]

4.00/5 (74 ratings by Goodreads)
(University of Oxford)
  • Format: Paperback / softback, 354 pages, height x width x depth: 245x174x20 mm, weight: 650 g, Worked examples or Exercises; 1 Line drawings, unspecified
  • Pub. Date: 09-Oct-2014
  • Publisher: Cambridge University Press
  • ISBN-10: 1107452643
  • ISBN-13: 9781107452640
Other books in subject:
  • Paperback / softback
  • Price: 66,25 €
  • This book is not in stock. Book will arrive in about 2-4 weeks. Please allow another 2 weeks for shipping outside Estonia.
  • Quantity:
  • Add to basket
  • Delivery time 4-6 weeks
  • Add to Wishlist
  • Format: Paperback / softback, 354 pages, height x width x depth: 245x174x20 mm, weight: 650 g, Worked examples or Exercises; 1 Line drawings, unspecified
  • Pub. Date: 09-Oct-2014
  • Publisher: Cambridge University Press
  • ISBN-10: 1107452643
  • ISBN-13: 9781107452640
Other books in subject:
"Richard Bird is famed for the clarity and rigour of his writing. His new textbook, which introduces functional programming to students, emphasises fundamental techniques for reasoning mathematically about functional programs. By studying the underlying equational laws, the book enables students to apply calculational reasoning to their programs, both to understand their properties and to make them more efficient. The book has been designed to fit a first- or second-year undergraduate course and is a thorough overhaul and replacement of his earlier textbooks. It features case studies in Sudoku and pretty-printing, and over 100 carefully selected exercises with solutions. This engaging text will be welcomed by students and teachers alike"--

More info

This book introduces fundamental techniques for reasoning mathematically about functional programs. Ideal for a first- or second-year undergraduate course.
Preface ix
1 What is functional programming?
1(21)
1.1 Functions and types
1(2)
1.2 Functional composition
3(1)
1.3 Example: common words
3(4)
1.4 Example: numbers into words
7(5)
1.5 The Haskell Platform
12(2)
1.6 Exercises
14(3)
1.7 Answers
17(3)
1.8
Chapter notes
20(2)
2 Expressions, types and values
22(27)
2.1 A session with GHCi
22(3)
2.2 Names and operators
25(2)
2.3 Evaluation
27(3)
2.4 Types and type classes
30(3)
2.5 Printing values
33(2)
2.6 Modules
35(1)
2.7 Haskell layout
36(1)
2.8 Exercises
37(5)
2.9 Answers
42(5)
2.10
Chapter notes
47(2)
3 Numbers
49(14)
3.1 The type class Num
49(1)
3.2 Other numeric type classes
50(2)
3.3 Computing floors
52(4)
3.4 Natural numbers
56(3)
3.5 Exercises
59(2)
3.6 Answers
61(1)
3.7
Chapter notes
62(1)
4 Lists
63(26)
4.1 List notation
63(2)
4.2 Enumerations
65(1)
4.3 List comprehensions
66(2)
4.4 Some basic operations
68(1)
4.5 Concatenation
69(1)
4.6 Concat, Map and Filter
70(3)
4.7 zip and zipWith
73(2)
4.8 Common words, completed
75(2)
4.9 Exercises
77(5)
4.10 Answers
82(5)
4.11
Chapter notes
87(2)
5 A simple Sudoku solver
89(21)
5.1 Specification
89(6)
5.2 Lawful program construction
95(2)
5.3 Pruning the matrix of choices
97(4)
5.4 Expanding a single cell
101(4)
5.5 Exercises
105(2)
5.6 Answers
107(2)
5.7
Chapter notes
109(1)
6 Proofs
110(35)
6.1 Induction over natural numbers
110(3)
6.2 Induction over lists
113(4)
6.3 The function foldr
117(5)
6.4 The function foldl
122(3)
6.5 The function scanl
125(2)
6.6 The maximum segment sum
127(4)
6.7 Exercises
131(4)
6.8 Answers
135(9)
6.9
Chapter notes
144(1)
7 Efficiency
145(36)
7.1 Lazy evaluation
145(4)
7.2 Controlling space
149(5)
7.3 Controlling time
154(2)
7.4 Analysing time
156(3)
7.5 Accumulating parameters
159(5)
7.6 Tupling
164(3)
7.7 Sorting
167(5)
7.8 Exercises
172(3)
7.9 Answers
175(5)
7.10
Chapter notes
180(1)
8 Pretty-printing
181(29)
8.1 Setting the scene
181(2)
8.2 Documents
183(4)
8.3 A direct implementation
187(2)
8.4 Examples
189(2)
8.5 The best layout
191(2)
8.6 A term representation
193(6)
8.7 Exercises
199(4)
8.8 Answers
203(6)
8.9
Chapter notes
209(1)
9 Infinite lists
210(29)
9.1 Review
210(2)
9.2 Cyclic lists
212(3)
9.3 Infinite lists as limits
215(6)
9.4 Paper--rock--scissors
221(5)
9.5 Stream-based interaction
226(2)
9.6 Doubly-linked lists
228(3)
9.7 Exercises
231(3)
9.8 Answers
234(3)
9.9
Chapter notes
237(2)
10 Imperative functional programming
239(37)
10.1 The IO monad
239(5)
10.2 More monads
244(3)
10.3 The State monad
247(4)
10.4 The ST monad
251(3)
10.5 Mutable arrays
254(5)
10.6 Immutable arrays
259(4)
10.7 Exercises
263(4)
10.8 Answers
267(8)
10.9
Chapter notes
275(1)
11 Parsing
276(22)
11.1 Parsers as monads
276(3)
11.2 Basic parsers
279(2)
11.3 Choice and repetition
281(4)
11.4 Grammars and expressions
285(3)
11.5 Showing expressions
288(3)
11.6 Exercises
291(3)
11.7 Answers
294(3)
11.8
Chapter notes
297(1)
12 A simple equational calculator
298(40)
12.1 Basic considerations
298(6)
12.2 Expressions
304(6)
12.3 Laws
310(2)
12.4 Calculations
312(3)
12.5 Rewrites
315(2)
12.6 Matchings
317(2)
12.7 Substitutions
319(2)
12.8 Testing the calculator
321(10)
12.9 Exercises
331(2)
12.10 Answers
333(4)
12.11
Chapter notes
337(1)
Index 338
Richard Bird is Emeritus Professor of Computer Science at Oxford University Computing Laboratory and a Fellow of Lincoln College, Oxford. He has authored many books, including Algebra of Programming (1996) and Pearls of Functional Algorithm Design (Cambridge University Press, 2010).