* Prerequisites for the course in Advanced Functional Programming
Things I will expect that you already know. If you unsure of any of
these concepts, please let me know.
- Basic functional programming. How to define recursive functions.
- Lists. How to define recursive functions 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 (the efficient one with linear complexity),
"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: filter, foldr, foldl
- curried functions
Example: What is the type of this function?
fun plus x y = x+y
- 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: Given the function definition above, why will this
function call give an error?
plus(5,6)