A higher-order function is simply a function that takes a function as an argument.
A functor is any type construction
T
for which there exists a higher-order function, call itmap
, that transforms a function of typea -> b
(given any two typesa
andb
) into a functionT a -> T b
.