Higher-order function
A function that takes function(s) as arguments or returns a function. map, filter, reduce are classics. Requires first-class functions. Standard in all modern languages; an FP core concept.
Example: [1,2,3].map(x => x*2) — map is the HOF, the arrow function is the argument. Function factory: const multiplier = n => x => x*n returns a function. Use cases: callbacks, event handlers, decorators, middleware chains, currying, partial application. Performance: modern JIT often inlines simple HOF calls. Distinct from first-order function (takes only data). Rust: HOFs via closures (Fn/FnMut/FnOnce traits) + iterators. Functional composition (compose(f, g)) is built from HOFs. Pipeline-style: data.filter(...).map(...).reduce(...) = HOF chain.