News

Those are examples of higher-order functions that accept functions as arguments, but plenty of them return functions as well. If you’ve ever seen a function call that has two sets of parentheses ...
We’ll want the users of our data structure to be able to determine which value they want, so we’ll modify our inner function to accept an argument that will determine which value to return.