Cli.widest: def of cli@0.2.0.0 Import: import cli@0.2.0.0/cli.bend as Cli Lines 5519-5526 of cli@0.2.0.0/cli.bend: https://jend.leeeet.dev/read.txt?path=cli@0.2.0.0/cli.bend&start_line=5519&end_line=5526 import Base # L, the widest left cell w with 2 + w + 2 <= K. def widest(rows: List<&2, Row>, +shorted: Bool, +k: Nat, +best: Nat) -> Nat: match rows: case Nil{}: best case row <> tail: +w = cell_width(row_cell(row, shorted)) widest(tail, shorted, k, Bool.pick(Nat, Nat.is_le((w + 4n : Nat), k), Nat.max(w, best), best)) Uses (10): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.pick https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.add https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.is_le https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.max https://jend.leeeet.dev/definition.txt?path=cli@0.2.0.0/cli.bend&name=Row https://jend.leeeet.dev/definition.txt?path=cli@0.2.0.0/cli.bend&name=cell_width https://jend.leeeet.dev/definition.txt?path=cli@0.2.0.0/cli.bend&name=row_cell