Expand description
Lazy iterator protocol for the Harn VM.
VmIter is the backing enum for VmValue::Iter. It’s a single-pass, fused
iterator; once next returns None the variant is replaced with
Exhausted. Step (a) only introduces source variants (Vec, Dict, Chars,
Gen, Chan, Exhausted) and wires them into the for-loop driver. Combinator
variants (Map, Filter, Take, …) and sink builtins land in later
steps per the plan.
Enums§
- VmIter
- Backing enum for
VmValue::Iter. See module docs.
Functions§
- drain
- Fully consume an iter handle into a Vec of values.
- iter_
from_ value - Convenience: wrap a source value into a
VmValue::Iter. Used by theiter()builtin and by combinator/sink implementations in later steps. - next_
handle - Advance a handle without holding a
RefCellborrow across the await.