You may have seen in math classes that it can be useful to compose multiple functions together. In computer science, this basically means that we want to take the output of one function and pass it into the input of another. Press the dog-eared page button on the top left and click libraries. Click on Iteration, Composition at the very top and import it. Now you should have this block:

compose f and g

compose, which does just that. It takes in two functions, f and g and returns the function f(g). For example, this

compose (2 * _) and (6 + _)

will return a function that is equivalent to

2 * (6 + _)

For example

call 2 * (6 + _) with inputs 3

will return 18 (the result of the calculation 2 * (6 + 3)). Notice that when we called the result of compose, we didn't use a gray border. To do this, you can right click compose and click "unringify". This is because compose already returns a function.

Now try writing

compose-from-list functions

which returns the result of composing the functions in the input list, from left to right. So, when called like this

compose-from-list ((_+2), sqrt(_), (10*_))

a function equivalent to this

will be returned.