Fmt.take_chars: def of cswap-bend-cli@0.1.0.0 Import: import cswap-bend-cli@0.1.0.0/tui/fmt.bend as Fmt Lines 103-109 of cswap-bend-cli@0.1.0.0/tui/fmt.bend: https://jend.leeeet.dev/read.txt?path=cswap-bend-cli@0.1.0.0/tui/fmt.bend&start_line=103&end_line=109 import Base # The first `n` characters of a line. def take_chars(+l: List<&2, Seg>, +n: Nat) -> List<&2, Seg>: match l: case Nil{}: Nil{} case Con{s, t}: take_pick(Nat.is_gt(seg_len(s), n), s, n, take_chars(t, Nat.sub(n, seg_len(s)))) Uses (7): 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.is_gt https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.sub https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/tui/fmt.bend&name=Seg https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/tui/fmt.bend&name=seg_len https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/tui/fmt.bend&name=take_pick