Consider a higher order function
applyAll
that takes in a list of functions and a value and applies all the functions sequentially on the value.
For example,
applyAll [f,g,h] x = f (g (h x))
Which of the following higher order functions would be useful to define such an
applyAll
?
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
Notice that we are attempting to create a function by composing all the functions.
Hence, we could define this with fold
Or simply,