Unfolding trees breadth-first in Haskell (2025)
Summary
An in-depth exploration of breadth-first unfolds in Haskell, showing how to construct level-based traversals compositionally and dynamically. It compares queue-based approaches with level-based and compositional lifts (weave, Phases) and introduces multiple variants (S, L, O, E), with code, benchmarks, and discussion of laziness and complexity.