def fit

cswap-bend-cli@0.1.0.0 · tui/fmt.bend:123

import cswap-bend-cli@0.1.0.0/tui/fmt.bend as Fmt
import 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)

Uses (6)

Used by (1)