Design decisions

151. Orders flip with desc, never by negating (2026-11-21)

  • Decision. Anything that picks by an order takes any Ord key, so "largest first" is desc(x): kruskal(es, by: e => desc(e.w)), kruskal_tree(es, w: e => desc(e.alt)) with reach(v, limit: desc(p + 1)), as sort(by: desc(..)) and heaps already do.
  • Why. etsr23r3p3 negated altitudes twice (w: -r.alt, limit: -p - 1), an off-by-one trap and an overflow trap at Int.MIN.
  • Reverse. Reintroduce the negation idiom in the two docs.