def fit
import cswap-bend-cli@0.1.0.0/tui/fmt.bend as Fmtimport Base
123# A line no wider than `w`: longer ones end in an ellipsis.
124def fit(+l: List<&2, Seg>, +w: Nat) -> List<&2, Seg>:
125 fit_if(Nat.is_gt(line_len(l), w), l, w)
import cswap-bend-cli@0.1.0.0/tui/fmt.bend as Fmtimport Base
123# A line no wider than `w`: longer ones end in an ellipsis.
124def fit(+l: List<&2, Seg>, +w: Nat) -> List<&2, Seg>:
125 fit_if(Nat.is_gt(line_len(l), w), l, w)