Higher-order function
A higher-order function is a function that accepts functions as arguments, returns functions as results, or both.
The Joy of JavaScript
A higher-order function is a function that takes one or more functions as arguments and/or returns a function as its result.
- How it is used
- Uses higher-order functions to separate application logic from array traversal, compose behavior, and supply logic to observable operators.
- How deep it goes
- Defines the function-passing pattern and works through array callbacks, returned closures, and validation wrappers; leaves richer validation to data types.
- Examples
- Shows block validation with filter, map, and reduce; returns an object-processing function from assemble; wraps functions with a null check.
- What you can do after
- Build it from scratch by returning functions that retain inputs, and apply it via array methods to compose smaller operations.
Read how The Joy of JavaScript explains higher-order function →
Grokking Simplicity
A function that accepts functions as arguments, returns functions as results, or otherwise treats functions as values.
- How it is used
- Abstracts over varying behavior to replace repeated loops, error-handling contexts, data updates, and other manual coding disciplines.
- How deep it goes
- Defines callbacks, derives functions through refactoring, and demonstrates returned functions, while noting readability tradeoffs without exploring language internals.
- Examples
- Uses forEach(), map(), filter(), reduce(), withLogging(), wrapLogging(), makeAdder(), update(), and array-loop refactorings.
- What you can do after
- Apply it via JavaScript by extracting callbacks, building reusable contexts, composing array operations, and returning specialized functions.
Read how Grokking Simplicity explains higher-order function →
F# in Action: A Revised Edition of Get Programming with F#
A higher-order function is a function that takes functions as arguments, returns a function, or both.
- How it is used
- Abstracts varying behaviors such as output, persistence, and collection transformations behind function arguments.
- How deep it goes
- Defines function arguments, explains inferred signatures, and applies them to collections, testing, and purity trade-offs.
- Examples
- Uses configurable calculation logging, customer printers, List.map transformations, and a fake database save for invoice tests.
- What you can do after
- Apply it by passing matching functions to vary behavior, compose transformations, and isolate testable side effects.
Read how F# in Action: A Revised Edition of Get Programming with F# explains higher-order function →
Tiny Python Projects: Learn coding and testing with puzzles and games
A higher-order function is a function that accepts another function as an argument or returns a function.
- How it is used
- Deploys map() and filter() to transform or select iterable elements while comparing them with list comprehensions.
- How deep it goes
- Explains function arguments, lambdas, laziness, and truthiness through runnable examples, but does not examine implementation internals.
- Examples
- Uses vowel replacement, number squaring, blue-car selection, and consonant extraction as concrete transformations and filters.
- What you can do after
- Apply it via Python's map() and filter() with named functions or lambdas, then materialize lazy results with list().
Functional Programming in Scala, Second Edition
A higher-order function is a function that takes one or more functions as arguments or returns a function as its result.
- How it is used
- Uses function values to remove duplicated logic and compose pure functional programs.
- How deep it goes
- Explains arguments, anonymous functions, polymorphism, partial application, currying, uncurrying, and composition, but not advanced library abstractions.
- Examples
- Demonstrates formatResult, anonymous predicates, isSorted comparisons, partial1, curry, uncurry, and composed trigonometric functions.
- What you can do after
- Builds reusable Scala functions, passes named or anonymous behavior, and derives implementations from polymorphic type signatures.
Read how Functional Programming in Scala, Second Edition explains higher-order function →
Functional Programming in JavaScript
A higher-order function is a function that takes other functions as arguments, returns a function, or both.
- How it is used
- Uses functions as configurable behavior for reusable processing, composition, and fluent data-processing chains.
- How deep it goes
- Explains passing and returning functions with JavaScript examples, then connects them to composition and chains without developing implementation internals.
- Examples
- Demonstrates sorting, operation application, returned functions, people filtering, enrollment averages, and reactive SSN validation.
- What you can do after
- Apply it in JavaScript to separate data traversal from behavior and assemble modular operations with functions such as filter and map.
Read how Functional Programming in JavaScript explains higher-order function →
Clojure: The Essential Reference
A higher-order function is a function that can be treated as a value by being stored, passed as an argument, or returned.
- How it is used
- Uses functions as values to defer arguments, adapt computations, and wrap repeated calls with caching.
- How deep it goes
- Defines function-as-value behavior and works through partial application and transparent caching; contrasts explicit partial with automatic currying.
- Examples
- Demonstrates partial request validation and memoized addition with visible cache misses.
- What you can do after
- Apply it via Clojure’s partial and memoize to adapt functions and cache repeat calls without changing the originals.
Read how Clojure: The Essential Reference explains higher-order function →
Python How-To
A higher-order function is a function that accepts functions as arguments, returns functions, or both.
- How it is used
- Uses function arguments for iterable transformations and returned functions for reusable specialized behavior.
- How deep it goes
- Works through map and a nested-function factory, but leaves closures without formal treatment.
- Examples
- Demonstrates string-to-float conversion with map and creates incrementing functions with different fixed amounts.
- What you can do after
- Build it from scratch with nested functions to create specialized callables, or apply map to transform iterable items.
Kotlin in Action, 2E
A higher-order function is a function that accepts functions as arguments, returns functions, or both.
- How it is used
- Extracts variable behavior into lambdas or function references to remove duplication and structure Kotlin code.
- How deep it goes
- Defines argument- and return-based forms, implements custom filters, and relates performance and return-control details to inline and anonymous functions.
- Examples
- Demonstrates arithmetic operations, string filtering, shipping calculators, contact predicates, and site-visit duration analysis.
- What you can do after
- Build it from scratch by declaring function-typed parameters or returns and supplying behavior as lambdas.
Read how Kotlin in Action, 2E explains higher-order function →
Julia as a Second Language
A higher-order function is a function that takes one or more functions as arguments, returns a function, or both.
- How it is used
- Uses functions as arguments to transform, select, and combine collection values in practical Julia programs.
- How deep it goes
- Defines the concept, builds a loop-based mapping function, and works through map, filter, and mapreduce without detailing their internals.
- Examples
- Demonstrates a sine table, pizza-revenue calculations, a loop-based map implementation, and Taylor-series sine.
- What you can do after
- Build it from scratch as a mapping loop, then apply it via Julia's map, filter, and mapreduce.
Read how Julia as a Second Language explains higher-order function →
The Well-Grounded Rubyist, Fourth Edition
A higher-order function is a function that takes another function as an argument or returns a function as its result.
- How it is used
- Uses functions as values to transform collections, delay computation, specialize arguments, and compose concise functional programs.
- How deep it goes
- Explains block arguments, returned procs, currying, partial application, calling forms, arity, and lazy higher-order computations.
- Examples
- Demonstrates map, multiplier procs, curried multiple-finding functions, addition, lazy squares, and recursive sums of powers.
- What you can do after
- Build it from scratch by passing blocks, returning procs, and using currying to create reusable functions with delayed arguments.
Read how The Well-Grounded Rubyist, Fourth Edition explains higher-order function →
Elixir in Action, Third Edition
A higher-order function is a function that accepts one or more functions as arguments, returns one or more functions, or both.
- How it is used
- Uses function values to express iteration, transformation, filtering, and accumulation without writing recursive loops.
- How deep it goes
- Defines the mechanism and works through Enum examples, but defers enumerable contracts and broader lazy iteration details.
- Examples
- Demonstrates printing, doubling, filtering odd numbers, reporting missing fields, summing values, and ignoring nonnumeric elements.
- What you can do after
- Apply via Enum functions to iterate, transform, filter, and reduce enumerable data with less recursive boilerplate.
Read how Elixir in Action, Third Edition explains higher-order function →
Learn Haskell by Example
A higher-order function is a function that receives one or more functions as arguments or returns a function as its result.
- How it is used
- Generalizes list transformations and selects program behavior by passing functions as values.
- How deep it goes
- Defines the abstraction, implements recursive list traversal, checks polymorphic types, and applies functions in a command-line tool.
- Examples
- Uses numeric increments, predicates, character replacement, line-numbering choices, and graph-function generalization.
- What you can do after
- Build reusable polymorphic list transformations and switch application behavior by selecting functions at runtime.
Read how Learn Haskell by Example explains higher-order function →
The Art of Code
A higher-order function is a function or method that accepts functions as arguments, returns a function, or both.
- How it is used
- Uses function-valued arguments to build readable, composable stream transformations.
- How deep it goes
- Defines the concept and demonstrates map, filter, chaining, method references, and lazy evaluation without deeper function-runtime internals.
- Examples
- Demonstrates recent-book filtering, author extraction, method references, chained streams, and collection with toList().
- What you can do after
- Apply it via Java streams to express filtering and transformation pipelines as readable, lazy stages.
Related concepts
- functionkind of · A function is a callable program unit that performs an operation, may accept inputs, and can produce a result or side effect.
- reduction operationincludes · A reduction operation combines multiple input values or partial results according to a combining rule to produce fewer results, often a single aggregate.
- map!includes · map! is a mutating collection operation that applies a transformation to elements and writes the resulting values into a destination collection.
- lambdauses · A lambda is a language construct that defines an unnamed function or callable, often as a value.
- curryingcontrasts with · Currying is the transformation of a function accepting multiple arguments into a sequence of functions that accept arguments incrementally, typically one at a time.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.













