161. read_all(until:) reads sentinel-ended input; group(by:, of:) projects values (2026-11-21)
- Decision.
read_all<T>(until: f)reads values until the first one withftrue, consumes that sentinel without returning it, and lets reading continue.a.group(by: k, of: g)storesg(x)instead ofxin each group. - Why. In the full pass over the 100 hill-climb problems, two blind dreams (ioi01p1, ioi05p2)
wrote
read stream Cmd until End, and their ports spelled it as awhile trueloop with abreak. Two dreams (dmpg16g2, ioi19p3) grouped(key, value)pairs. Both are options on existing functions (decision 60: options are named arguments), not new names. - Reverse. Drop
until:fromread_allandof:fromgroupinspec/std, and restore the loop incorpus/problems/ioi05p2/spec.cp.