test: adapt §6.3 laziness counters to Option A; note interleave/jolt-r81
Option A makes `take` lazy, so the §6.3 counter tests must force the take result (dorun) to drive realization — an unconsumed take correctly realizes nothing. With that, all 37 lazy-infinite cases pass and the minimal-realization counts match (proving the Option A transformers realize exactly the demanded prefix). interleave kept eager: a lazy (cons-recursive) version leaks its lazy-seq macro expansion under :compile? — the same jolt-r81 bug that blocks lazy reductions/ tree-seq. Documented in 20-coll.clj. Gate: conformance 246x3, lazy-infinite 37/37, fixpoint, self-host, specs+unit green. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
fa36488dad
commit
3a42438b68
2 changed files with 22 additions and 17 deletions
|
|
@ -191,7 +191,10 @@
|
|||
(defn xml-seq [root]
|
||||
(tree-seq (complement string?) (comp seq :content) root))
|
||||
|
||||
;; Lazy interleave: round-robin one element from each coll until any exhausts.
|
||||
;; Eager interleave: round-robin one element from each coll until any exhausts.
|
||||
;; A lazy version (canonical Clojure cons-recursion) hits the same compile-mode
|
||||
;; overlay bug as reductions/tree-seq — a self-recursive lazy-seq leaks its macro
|
||||
;; expansion under :compile? (see jolt-r81). Eager until that's fixed.
|
||||
(defn interleave [& colls]
|
||||
(if (empty? colls)
|
||||
(list)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue