def split

ezmcp@0.1.0.0 · src/line.bend:39

import ezmcp@0.1.0.0/src/line.bend as Line
import Base

39# bytes split after every newline: each piece but the last ends with its
40# newline, and the last has none
41def split(bs: List<&2, U32>) -> List<&2, List<&2, U32>>:
42  match bs:
43    case []:
44      [[]]
45    case +b <> t:
46      split.at(b, split(t), nl(b))

Uses (4)

Used by (1)