jolt/jolt-core/clojure/core
Yogthos c7e162add4 core: Phase 5 Option A — lazy interleave/reductions/tree-seq via letfn
These three were the last eager transformers, blocked by jolt-r81: a self-
recursive lazy-seq in the overlay leaks its macro expansion under :compile? when
recursion goes through a top-level name or (fn name …) self-name. Rewriting the
recursion as letfn-bound (the form partition-by/mapcat/dedupe already use, which
compiles cleanly) sidesteps the bug. All three are now lazy in interpret,
compile, and self-host — completing Option A for every transformer.

interleave: canonical lazy cons-recursion (2-arity) + map/concat (n-arity).
reductions: letfn step accumulator. tree-seq: letfn walk + lazy mapcat.

Gate: conformance 246x3, lazy-infinite 40/40 (+interleave/reductions/tree-seq
infinite cases), fixpoint, self-host, specs+unit green.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-08 17:28:55 -04:00
..
00-kernel.clj core: staged-bootstrap kernel tier; move second/peek/subvec/mapv/update to Clojure 2026-06-06 13:15:17 -04:00
00-syntax.clj core: port when-let to the overlay — finishes the Phase 3 macro migration 2026-06-07 19:49:27 -04:00
10-seq.clj Review fixes: revert partition+concat overlay, delete dead defns, dedupe de-duplicated 2026-06-08 12:04:48 -04:00
20-coll.clj core: Phase 5 Option A — lazy interleave/reductions/tree-seq via letfn 2026-06-08 17:28:55 -04:00
30-macros.clj core: port when-let to the overlay — finishes the Phase 3 macro migration 2026-06-07 19:49:27 -04:00
40-lazy.clj Review fixes: partition+concat in 10-seq, delete dead defns, dedupe de-duplicated 2026-06-08 11:58:39 -04:00
MIGRATION.md migration doc: phase 3 status + the hot-macro expansion-speed finding 2026-06-07 08:47:04 -04:00