Log In
Or create an account ->
Imperial Library
Home
About
News
Upload
Forum
Help
Login/SignUp
Index
Halftitle page
Title page
Copyright page
Contents
Preface
1 What is functional programming?
1.1 Functions and types
1.2 Functional composition
1.3 Example: common words
1.4 Example: numbers into words
1.5 The Haskell Platform
1.6 Exercises
1.7 Answers
1.8 Chapter notes
2 Expressions, types and values
2.1 A session with GHCi
2.2 Names and operators
2.3 Evaluation
2.4 Types and type classes
2.5 Printing values
2.6 Modules
2.7 Haskell layout
2.8 Exercises
2.9 Answers
2.10 Chapter notes
3 Numbers
3.1 The type class Num
3.2 Other numeric type classes
3.3 Computing floors
3.4 Natural numbers
3.5 Exercises
3.6 Answers
3.7 Chapter notes
4 Lists
4.1 List notation
4.2 Enumerations
4.3 List comprehensions
4.4 Some basic operations
4.5 Concatenation
4.6 concat, map and filter
4.7 zip and zipWith
4.8 Common words, completed
4.9 Exercises
4.10 Answers
4.11 Chapter notes
5 A simple Sudoku solver
5.1 Specification
5.2 Lawful program construction
5.3 Pruning the matrix of choices
5.4 Expanding a single cell
5.5 Exercises
5.6 Answers
5.7 Chapter notes
6 Proofs
6.1 Induction over natural numbers
6.2 Induction over lists
6.3 The function foldr
6.4 The function foldl
6.5 The function scanl
6.6 The maximum segment sum
6.7 Exercises
6.8 Answers
6.9 Chapter notes
7 Efficiency
7.1 Lazy evaluation
7.2 Controlling space
7.3 Controlling time
7.4 Analysing time
7.5 Accumulating parameters
7.6 Tupling
7.7 Sorting
7.8 Exercises
7.9 Answers
7.10 Chapter notes
8 Pretty-printing
8.1 Setting the scene
8.2 Documents
8.3 A direct implementation
8.4 Examples
8.5 The best layout
8.6 A term representation
8.7 Exercises
8.8 Answers
8.9 Chapter notes
9 Infinite lists
9.1 Review
9.2 Cyclic lists
9.3 Infinite lists as limits
9.4 Paper–rock–scissors
9.5 Stream-based interaction
9.6 Doubly-linked lists
9.7 Exercises
9.8 Answers
9.9 Chapter notes
10 Imperative functional programming
10.1 The IO monad
10.2 More monads
10.3 The State monad
10.4 The ST monad
10.5 Mutable arrays
10.6 Immutable arrays
10.7 Exercises
10.8 Answers
10.9 Chapter notes
11 Parsing
11.1 Parsers as monads
11.2 Basic parsers
11.3 Choice and repetition
11.4 Grammars and expressions
11.5 Showing expressions
11.6 Exercises
11.7 Answers
11.8 Chapter notes
12 A simple equational calculator
12.1 Basic considerations
12.2 Expressions
12.3 Laws
12.4 Calculations
12.5 Rewrites
12.6 Matchings
12.7 Substitutions
12.8 Testing the calculator
12.9 Exercises
12.10 Answers
12.11 Chapter notes
Index
← Prev
Back
Next →
← Prev
Back
Next →