Higher-order functions are functions which either

  1. take functions as arguments or
  2. return them as output

(or both). Functions which do neither of these are known, in contrast, as first-order functions.

Higher-order functions are a cornerstone of the functional programming paradigm, in which the manipulation and transformation of functions is at least as common as the manipulation and transformation of data. That said, several of the most widely-implemented higher-order functions are also found in modern imperative languages. Examples include

  1. map
  2. filter
  3. folding functions (foldl, foldr etc.)
history | show excerpt | excerpt history