Skip to content
Reproduced paper researcher

A book that argues operations research is a handful of functions

Applied Higher Order Functions catalogues about 480 optimisation, decision and validation algorithms and shows they are compositions of a small set of higher-order-function patterns.

Jiri Knesl · Internal reviewer: Flexiana Decision Lab · 1 July 2026
Read Limitations Operations researchClojure & data-oriented systemsDecision under uncertainty

Applied Higher Order Functions: A Functional Architecture of Optimisation, Decision Making, and Validation is a book by Jiri Knesl. Its argument is simple and, we think, underappreciated: the sprawling catalogue of operations-research algorithms is not hundreds of unrelated recipes but compositions of a small set of higher-order-function patterns.

What it covers

Sixteen chapters across five parts, three appendices, and a catalogue of roughly 480 algorithms annotated with the patterns they share, spanning continuous and discrete optimisation, sequential decision-making under uncertainty, and temporal-logic validation. Every algorithm is expressed in Clojure against the companion library, orhof, so the argument is code rather than rhetoric.

The ten patterns

The catalogue annotates each algorithm with the patterns it is built from, and there are ten of them: ITERATE, PARAMETERIZE, COMPOSE, DELEGATE, REDUCE, MAP-OVER, GENERATE, TRANSFORM-PROBLEM, WRAP and BRANCH. That is the whole vocabulary. The claim of the book is that roughly 480 named algorithms are recombinations of those ten, and the catalogue is where you check it rather than take it on faith: each entry names its patterns, so a disagreement is specific and arguable.

How much of it is checkable

More than is usual for a technical book, and less than the phrase “the code runs” would imply, so it is worth being exact:

  • The 167 listings are extracted from the manuscript source and parse-checked as a suite. A script reads every one and fails if any does not parse, which keeps the text from drifting away from code Clojure will accept.
  • The library the listings are written against carries its own tests: orhof is 251 public functions across 30 namespaces with 187 deterministic tests, and no dependency beyond Clojure itself.
  • What is not claimed: there is no harness that evaluates every listing end to end. The parse check and the library tests are what exist, and they are the claim.

Why a book

Because the pattern only becomes convincing at scale. One example: that gradient descent, conjugate gradient and Adam are one descent framework with different parameters, is a neat trick. Four hundred and eighty examples across three domains is a thesis: that much of decision science is more unified than its textbooks suggest, and that the unifying structure is functional.

The interior is under a Creative Commons Attribution-ShareAlike licence, and you can order the hardback. Its companion library is documented here; Rainbow uses the same catalogue as its proving curriculum.

Limitations & where this does not apply

The thesis is structural and pedagogical: it argues that a small set of patterns organises a large body of algorithms. It is not a claim that these compositions outperform specialised industrial implementations, nor a substitute for the numerical care each algorithm needs in production.

Commercial relevance

The book and its library are the shared vocabulary our Decision Lab uses to model a client's decision quickly and to hand work between people without re-deriving the basics.

Cite this

Jiri Knesl (2026). A book that argues operations research is a handful of functions. Flexiana Research. https://flexiana.com/research/applied-higher-order-functions-book

Start with the decision

Have a decision this research touches?

If a result here maps onto a choice your business makes repeatedly, the next step is a short, senior conversation — not a large commitment.