def width
import cswap-bend-cli@0.1.0.0/render.bend as Renderimport Base
153def width(ls: List<&2, Line>, +w: Nat) -> Nat:
154 match ls:
155 case Nil{}:
156 1n+w
157 case Con{Line{+l, b}, t}:
158 width(t, sel_n(Nat.is_gt(String.length(l), w), String.length(l), w))