Old structure
- Getting set up
- Installation and start-up
- Variables and functions
- Introduction to variables and functions (with first contact with types)
- Immutability of variables
- Lists and tuples
- Introduction to lists
- List building with (:)
- Introduction to tuples (with the first example of pattern matching)
- Next steps
- Source files
- Introduction to control structures (if / case, with a teaser to PM)
- Piece-wise function definition
- Function composition
- Let bindings
- Type basics
- Introduction / motivation
- Simple examples (with a teaser to number classes)
- Functional types
- Introduction to polymorphic types
- Type signatures
- Type inference
- Simple input and output
- Introduction / motivation
- Actions
- Actions and types
- IO trail pointers
|
New structure
- Getting set up
- Installation and start-up
- GHCi as a calculator
- Defining functions
- Source files
- Introduction to definitions (functions, variables), first contact with types
- Examples only with
Int
where clause, layout
- Immutability of variables
- Truth values (for defining more interesting functions)
- Examples with booleans
1 == 2
- Guards
- More examples
- Type basics
- Introduction / motivation
False < 2
- Type signatures, type inference
- Int, Bool, Function types
- Introduction to polymorphic types, mention of numeric classes for overloading,
Double for floating point numbers
- Tuples and lists
- Introduction to tuples (pattern matching) - useful for returning multiple results
- Lists are head + tail, (:) and []
- Pattern matching: (:) and [] can also be used on the left-hand side
- Building a vocabulary
- All syntactic pieces in place, explain that the reader now has to learn lots of types and functions
- Example program, exercises!
- Cheat sheet: Prelude types, Prelude functions, sorted by category. Each category comes with a short explanation / overview of the most important concepts / functions; link to subsequent chapters for more detailed explanations. Not sure how to organize this.
- Functions
- Lists
- Strings
- Input / Output
- Simple input and output
- Introduction / motivation
- Actions
- Actions and types
- IO trail pointers
|