187. Binary search spends only the queries it needs (2026-11-21)
- Decision.
bsearch_first/bsearch_lastsearch ther.len + 1outcomes (each position, ornone) directly, so they callokat most ceil(log2(r.len + 1)) times: 30 on1..=1e9. They no longer probe the ends first or assert thatokis monotone at the ends. - Why. A contest dry run found 33/31 calls on
1..=1e9, so the documented interactive example broke its ownask(limit: 30)budget. Every call may be a query, so a debug-only check would make debug and release disagree on an interactor. - Reverse. Restore the end probes in
stdlib/seq.cp; interactive budgets then need a hand-written loop.