Add the solution to Problem 158

Problem 158' task is to write a function to perform the decurrying
procedure. Just use reduce to implement this function.