You have now seen several examples where functions are passed as arguments to other functions, such as with *fold* and *map.* In this chapter, I will show several examples where functions are also returned as values. This will lead to several techniques for improving definitions that we have already written – techniques that we will use often in the remainder of the text.

**9.1 Currying**

The first improvement relates to the notation we have used to write function applications, such as *simple x y z.* Although I have noted the similarity of this to the mathematical notation *simple(x, y, z)*, in fact, there is an important difference, namely that *simple x y z* is actually equivalent to (((*simple x ...*

Start Free Trial

No credit card required