Tables of Contents for Haskell
Introducing functional programming
1
18
Computers and modelling
2
1
The Haskell programming language
6
1
Expressions and evaluation
7
1
Looking forward: a model of pictures
12
2
Type and functional programming
16
1
Calculation and evaluation
17
2
Getting started with Haskell and Hugs
19
13
A first Haskell program
19
3
The standard prelude and the Haskell libraries
26
1
A second example: Pictures
27
3
Errors and error messages
30
2
Basic types and definitions
32
21
Floating-point numbers: Float
43
3
Designing and writing programs
53
18
Where do I start? Designing a program in Haskell
53
5
Primitive recursion in practice
62
3
General forms of recursion
65
2
Data types: tuples and lists
71
25
Introducing tuples, lists and strings
72
1
Generic functions: polymorphism
87
3
Haskell list functions in Prelude.hs
90
2
Programming with lists
96
19
The Picture example, revisited
96
4
Extended exercise: positioned pictures
100
3
Extended exercise: supermarket billing
108
7
Defining functions over lists
115
20
Pattern matching revisited
115
2
Lists and list patterns
117
2
Primitive recursion over lists
119
1
Finding primitive recursive definitions
120
5
General recursions over lists
125
3
Example: text processing
128
7
Reasoning about programs
135
17
Understanding definitions
136
1
Definedness, termination and finiteness
138
2
Further examples of proofs by induction
144
4
Generalizing the proof goal
148
4
Generalization: patterns of computation
152
15
Patterns of computation over lists
153
2
Higher-order functions: functions as arguments
155
6
Folding and primitive recursion
161
4
Generalizing: splitting up lists
165
2
Function-level definitions
168
1
Functions as values and results
171
4
Revisiting the Picture example
181
3
Currying and uncurrying
185
1
Example: creating an index
186
7
Verification and general functions
193
9
The development cycle
202
4
Development in practice
206
4
Overloading and type classes
210
17
Signatures and instances
215
5
A tour of the built-in Haskell classes
220
5
Monomorphic type checking
228
2
Polymorphic type checking
230
8
Type checking and classes
238
4
Introducing algebraic types
243
7
Recursive algebraic types
250
7
Polymorphic algebraic types
257
4
Case study: program errors
261
4
Design with algebraic data types
265
4
Algebraic types and type classes
269
5
Reasoning about algebraic types
274
6
Case study: Huffman codes
280
19
Building Huffman trees
290
1
The Haskell abstract data type mechanism
301
3
Implementing the simulation
311
4
Calculation rules and lazy evaluation
340
4
List comprehensions revisited
344
7
Data-directed programming
351
3
Case study: parsing expressions
354
10
Case study: simulation
373
2
Programming with actions
383
30
The basics of input/output
385
2
Iteration and recursion
391
5
The do construct revisited
400
1
Monads for functional programming
401
6
Example: monadic computation over trees
407
6
Time and space behaviour
413
23
Complexity of functions
414
4
The complexity of calculations
418
4
Implementations of sets
422
1
Avoiding recomputation: memorization
429
7
A Functional, imperative and OO programming
442
8
D Understanding programs
459
3
E Implementations of Haskell
462
2