In Chapter 7, Dr. Meijer teaches us about Higher-Order Functions. A function is called higher-order if it takes a function as an argument and returns a function as a result:
twice :: (a -> a) -> a -> a
twice f x = f (f x)
The function twice above is higher order because it takes a function (f x) as it first argument and returns a function (f(fx))
Dr. Meijer will elaborate on why higher-order functions are important and there are some really interesting side-effects of higher-order functions such as defining DSLs as collections of higher-order functions and using algebraic properties of higher-order functions to reason about programs.
functional, programming, haskell