Read Webber Chapter 9, which is primarily about first-class functions
in ML. Do exercises 1-15, 27, and 28 at the end of the chapter.
- Note the restriction that 1-15 not use any additional named functions
or explicit recursion. This is important! These should be
one-line solutions as described
at the beginning of the exercises, usually using map, foldr, or foldl.
- We talked about (and even defined) map in class, but
not about foldl or foldr.
You will need to read about these in the chapter and think carefully
about what they do.
- We similarly did not talk about currying, which you will also read
about in the chapter. It's a very powerful concept, but for these
exercises will mostly just let you use a slightly nicer syntax to define
your functions (no parentheses -- this is the "little secret" on the top of
page 140). We'll talk more about currying in class
Have fun -- this is starting to feel like real functional programming!