Preface |
|
vii | |
Acknowledgments |
|
ix | |
About this book |
|
x | |
About the author |
|
xiv | |
|
Lesson 1 Getting started with Haskell |
|
|
1 | (12) |
|
Unit 1 FOUNDATIONS OF FUNCTIONAL PROGRAMMING |
|
|
|
Lesson 2 Functions and functional programming |
|
|
13 | (10) |
|
Lesson 3 Lambda functions and lexical scope |
|
|
23 | (10) |
|
Lesson 4 First-class functions |
|
|
33 | (10) |
|
Lesson 5 Closures and partial application |
|
|
43 | (11) |
|
|
54 | (11) |
|
Lesson 7 Rules for recursion and pattern matching |
|
|
65 | (9) |
|
Lesson 8 Writing recursive functions |
|
|
74 | (9) |
|
Lesson 9 Higher-order functions |
|
|
83 | (9) |
|
Lesson 10 Capstone: Functional object-oriented programming with robots! |
|
|
92 | (15) |
|
|
|
|
107 | (13) |
|
Lesson 12 Creating your own types |
|
|
120 | (12) |
|
|
132 | (10) |
|
Lesson 14 Using type classes |
|
|
142 | (13) |
|
Lesson 15 Capstone: Secret messages! |
|
|
155 | (20) |
|
Unit 3 PROGRAMMING IN TYPES |
|
|
|
Lesson 16 Creating types with "and" and "or" |
|
|
175 | (12) |
|
Lesson 17 Design by composition---Semigroups and Monoids |
|
|
187 | (14) |
|
Lesson 18 Parameterized types |
|
|
201 | (13) |
|
Lesson 19 The Maybe type: dealing with missing values |
|
|
214 | (11) |
|
Lesson 20 Capstone: Time series |
|
|
225 | (24) |
|
|
|
Lesson 21 Hello World!---introducing IO types |
|
|
249 | (12) |
|
Lesson 22 Interacting with the command line and lazy I/O |
|
|
261 | (10) |
|
Lesson 23 Working with text and Unicode |
|
|
271 | (11) |
|
Lesson 24 Working with files |
|
|
282 | (12) |
|
Lesson 25 Working with binary data |
|
|
294 | (14) |
|
Lesson 26 Capstone: Processing binary files and book data |
|
|
308 | (23) |
|
Unit 5 WORKING WITH TYPE IN A CONTEXT |
|
|
|
Lesson 27 The Functor type class |
|
|
331 | (12) |
|
Lesson 28 A peek at the Applicative type class: using functions in a context |
|
|
343 | (14) |
|
Lesson 29 Lists as context: a deeper look at the Applicative type class |
|
|
357 | (15) |
|
Lesson 30 Introducing the Monad type class |
|
|
372 | (15) |
|
Lesson 31 Making Monads easier with donotation |
|
|
387 | (15) |
|
Lesson 32 The list monad and list comprehensions |
|
|
402 | (9) |
|
Lesson 33 Capstone: SQL-like queries in Haskell |
|
|
411 | (20) |
|
Unit 6 ORGANIZING CODE AND BUILDING PROJECTS |
|
|
|
Lesson 34 Organizing Haskell code with modules |
|
|
431 | (11) |
|
Lesson 35 Building projects with stack |
|
|
442 | (10) |
|
Lesson 36 Property testing with QuickCheck |
|
|
452 | (14) |
|
Lesson 37 Capstone: Building a prime-number library |
|
|
466 | (17) |
|
|
|
Lesson 38 Errors in Haskell and the Either type |
|
|
483 | (14) |
|
Lesson 39 Making HTTP requests in Haskell |
|
|
497 | (10) |
|
Lesson 40 Working with JSON data by using Aeson |
|
|
507 | (17) |
|
Lesson 41 Using databases in Haskell |
|
|
524 | (20) |
|
Lesson 42 Efficient, stateful arrays in Haskell |
|
|
544 | (17) |
Afterword What's next? |
|
561 | (5) |
Appendix Sample answers to exercises |
|
566 | (23) |
Index |
|
589 | |