Defs.split: def of lawful-fields@0.1.1.0 Import: import lawful-fields@0.1.1.0/defs.bend as Defs Lines 23-30 of lawful-fields@0.1.1.0/defs.bend: https://jend.leeeet.dev/read.txt?path=lawful-fields@0.1.1.0/defs.bend&start_line=23&end_line=30 import Base # The pieces of xs between separators, as Base's String.split does for text: # always at least one piece, so [] gives [[]] and [sep] gives [[], []]. def split(xs: List<&2, U32>, +sep: U32) -> List<&2, List<&2, U32>>: match xs: case Nil{}: [Nil{}] case Con{+x, t}: split.fin(x, split(t, sep), U32.is_eq(x, sep)) Uses (4): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.is_eq https://jend.leeeet.dev/definition.txt?path=lawful-fields@0.1.1.0/defs.bend&name=split.fin