Solution Review: Let's Curry!
This lesson will explain the solution to the problem in the previous lesson.
We'll cover the following...
We'll cover the following...
Solution #
Explanation #
A simple approach for converting the multiply function to a curried function is:
However, the question requires you to write a function, currying, that takes any function and converts it into a currying function. So how do we do that?
-
First, we are passing the function,
func, to our function,currying(line 1).function currying(func) -
The next step is to think about the output. Re-stating the problem, we want to return a currying function. Hence, we define the function ...