Design decisions

160. d.closure(over:) is the value form of floyd_warshall (2026-11-21)

  • Decision. d.closure(over: r) -> ?[V, V]?W returns a new closed matrix (None on a negative cycle), as sorted is to sort; floyd_warshall(mut d, over:) stays the in-place form.
  • Why. The egoi23p4 dream wrote g.closure(semiring). The hill-climb rejected it as a duplicate of floyd_warshall, and the port then needed a four-line clone-run-compare helper. The value counterpart of an in-place algorithm is the existing sort/sorted convention, not a second algorithm.
  • Reverse. Delete closure from spec/std/graph.cp and restore the helper in the port.