Multi-phase computation as an applicative functor
summary
Claims that structuring a computation as an applicative with phases (implemented via Day convolution / an iterated, homogeneous “phases” type) lets a single structural traversal fuse otherwise separate passes. Uses Writer/Min to gather, Reader/state to scatter, and a long‑zip applicative instance to align phases instead of concatenating them. Replaces lazy circular programs for repmin and breadth‑first relabeling with eager, multiphase implementations, generalizes to N phases, and the examples (repmin, breadth‑first relabel, sort‑and‑repopulate) work as pure applicative constructions.
AI-written summary · about
chapters (9)
- 0:00Workshop overview
- 4:20Applicative functors
- 16:53Traversing data structures
- 20:25Breadth-first challenges
- 28:14Repman problem
- 35:24Two-phase computations
- 48:50Multiphase computations
- 59:45Breadth-first reversal
- 1:05:51Q&A
related talks
48mPhases in Software Architecture
32mApplicative: The Origin Story
01h 16mFunctional Composition Beyond Monads
58mMonoids, Monads, and Applicative Functors: Repeated Software Patterns
35mThe Functor, Applicative, Monad talk
27mComputation Expressions in Scala
45mAPLicative Programming with Naperian Functors
44mFunction reuse is just wishful thinking
