January 5, 2026
Code theory, hot takes, mild chaos
Selective Applicative Functors
The ‘choose-your-path’ code idea that split the room
TLDR: A new write-up says this “middle path” tool lets code choose between a few preset routes, explained through a different lens. Comments split between “too abstract, needs editing” and “surprisingly clear,” with one reader spotting a small error—important because it could simplify real-world control flow.
A new explainer claims to finally pin down “selective applicative functors” by reframing them as a way to pick between a few pre-set paths—think “choose-your-own-adventure,” but for programs. Instead of wild, make-it-up-as-you-go logic (that’s what monads do), this sits in the middle: you plan the options, then select one based on earlier results. The twist: the author argues the real action lives in “arrows” (a way to connect steps), not just plain functions—cue brainy cheers and glazed eyes in equal measure.
The comments? A delightful split-screen. One camp calls it too abstract and drowning in jargon, with munchler saying it’s “opaque to even most functional programmers.” Another camp loved the vibe, with geeio insisting it was an approachable intro that finally clicked. noelwelsh liked the excitement but begged for a tighter, less meandering write-up. Meanwhile, the pedants rolled up: nick_g spotted a type tweak like an eagle-eyed copy editor. Jokes flew about needing three re-reads and a snack break before the big reveal. Verdict: half the crowd wants a cleaner, shorter guide; the rest are happy someone put words to a middle-ground idea that could help ordinary Haskell code make smarter choices without going full galaxy-brain.
Key Points
- •Selective applicative functors were introduced in a 2019 paper and defined via a Selective typeclass extending Applicative with select.
- •A branch combinator can be derived from select, but prior analyses struggled due to lack of monoidal tensor accounts and poor self-composition of branch.
- •The article argues selective applicatives encode exclusive, finite choice and are best modeled using arrows (composable profunctors).
- •Finite-case functions are central to the approach and can be represented with a CaseTree data type; functors can be recovered as arrows from unit.
- •Selective applicatives are positioned between monads and applicatives, allowing finite control flow; they relate to Alternative for nondeterministic choice.