67. IntervalMap.assign zero-alloc on_old: callback (2026-11-21)
IntervalMap.assign(mut self, r: Range<D>, val: T, on_old: (Range<D>, T) -> () = (_, _) => ())reports overwritten runs via an optional callback instead of returning aListor-> yields. Reason:cpl_ir::pushed::Feedsintentionally does not push-> yieldsonmut selfmethods (an earlybreakcould leave the partition half-mutated), whereas a callback parameter both enforces partition completion and devirtualizes to an inlined template functor in C++ with zero heap allocation. Combined with a single-run fast path,cf2237hdropped from1.66sto1.26son max binary-tree input andIntervalMapruns at1.15xmatched C++std::mapODT (0.15svs0.13s). Reverse: changeassignback to returnList<(range: Range<D>, val: T)>instdlib/interval.cpand restorefor (r, t) in paint.assign(...)inproto/ports/ecnerwala/cf2237h.cp.