76. range: on std.seq.{reverse, rotate_left, rotate_right} (debt) and scan_in_place (2026-11-21)
- Keep
range: ?Range<Int> = noneonstd.seq.{reverse, rotate_left, rotate_right}as temporary debt until core supports mutable slice views.- Reason: The coherent spelling for in-place subrange operations (
reverse,rotate_left,rotate_right,sort,fill) is a mutable slice receiver (xs[l..r].reverse()), with no per-methodrange:option. Decision 61'sListViewis strictly read-only across all four compiler crates (view_readonlyincpl-check/lends.rs, not aPlaceincpl-ir, immutableRc<Vec<Value>>incpl-interp,const T*incpl::View<T>), and mutable slices also require distinguishing fixed-length slice receivers from growableList<T>(push/pop). Filed asArea: corefriction inresearch/frictions/cf2207h3.md. - Reverse: Once core lands mutable slice views, rewrite
reverse(mut xs, range: r)/rotate_*(mut xs, k, range: r)toxs[r].reverse()/xs[r].rotate_*(k)via acpl fixlint and drop therange:parameter.
- Reason: The coherent spelling for in-place subrange operations (
- Add
scan_in_place<T>(mut self: List<T>, f: (T, T) -> T)andsuffix_scan_in_place<T>(mut self: List<T>, f: (T, T) -> T)tostd.seq; codify_in_placenaming rule and log[D]Treceiver debt.- Reason: In-place prefix/suffix scans over a growing
Listhad no allocation-free, lint-clean spelling (for i in 1..a.len: a[i] += a[i - 1]tripsL0414, whilescanallocates a fresh copy every call). Adopted byproto/ports/ecnerwala/cf2187f2.cp. - Naming: Logged in
plan/STDLIB.md§2 ("Mutator vs copy twins"): where mutation is the default, the mutator owns the bare verb and the copy takes the participle (sort/sorted); where the pure copy already owns the established verb (scan,suffix_scan), the zero-allocation mutating twin uses_in_place. - Debt (
[D]T) — resolved: All length-preserving in-place sequence mutators (scan_in_place,suffix_scan_in_place,reverse,rotate_left,rotate_right,nth_element,next_permutation,prev_permutation, andstd.rand.Rng.shuffle) now use the built-inIndexedMuttrait (is_indexed_mut()+ zero-basedset_at(i, x)/swap_idx(i, j)), coveringList<T>, 1D[D]T(nominal, range, and cut domains), andStrwith one signature and no per-type overloads. Mutable slice views remain tracked inresearch/frictions/cf2207h3.md#1b and will plug intois_indexed_mut()automatically once core adds them. - Reverse: Remove
scan_in_placeandsuffix_scan_in_placefromstdlib/seq.cpandplan/STDLIB.md, revert the §2 naming rule, and restoreends = scan(ends, (x, y) => x + y)incf2187f2.cp.
- Reason: In-place prefix/suffix scans over a growing