I am going through a practice exam for my programming languages course. One of the problems states:
Define a function named
function+
that “adds” two functions together and returns this composition. For example:((function+ cube double) 3)
should evaluate to 216, assuming reasonable implementations of the functions
cube
anddouble
.
I am not sure how to approach this problem. I believe you are supposed to use the functionality of lambdas, but I am not entirely sure.