higher order functions

Functions using functions as input and/or output are higher order functions.
Merge pull request #335 from weakish/patch-2

higher order functions