* Prerequisites
Things I will expect that you already know.
- Basic functional programming. How to define recursive functions.
- Lists. How to define recursive finctions over lists.
- How to define your own inductive data types using "datatype" in SML.
- You should be familiar with standard functions such as append,
member, last, reverse, "naive" reverse (with quadratic
complexity), length, factorial, the Fibonacci function, map
- Algorithms for sorting: merge sort and quick sort
- Binary search trees
- Complexity: at least understand the distinction linear vs quadratic
- Tail recursion.
The following will also come up, but this has lower priority:
- The standard higher-order functions: map, filter, foldr, foldl
- An understanding of type inference. I don't require a detailed
understanding or that you can manage very complex examples, but you
need to understand why some programs are accepted by the type
system and others are not.
Example:
fun plus x y = x+y
Why will this function call give an error?
plus(5,6)
- curried functions