If you think about lambdas and what operations we could do on them to obtain other lambdas, two things spring to mind:
- Something about combining two lambdas, which we've seen in functional composition
- Something about the parameters of a lambda, which we'll visit next
What could we do with a lambda's parameters? There are two things:
- Decompose a lambda with multiple arguments into more lambdas with one argument, an operation called currying
- Obtain a lambda with N-1 arguments by binding an argument of a lambda with N arguments to a value, an operation called partial application
For reasons that will soon become apparent, the two operations are connected, so we'll discuss them together.