You might have noticed how the new curried sum function isn’t all too different from our very first sum function which was taking a single list of parameters with three arguments. So, what is the point of currying?
Our curried sum function is much more flexible than the non-curried version and gives us a more generic function which we can use in multiple different ways. For instance, we can simply pass the cube function to sum without passing the second parameter list (1,5). sum(cube) is valid on its own as it is a valid function call and returns another function. The second parameter of two integers can now be passed whenever required later on in the program.
Let’s wrap up our discussion in the next lesson by taking a closer look at how multiple parameter lists expand.