Defs.join: def of lawful-fields@0.1.1.0 Import: import lawful-fields@0.1.1.0/defs.bend as Defs Lines 133-141 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=133&end_line=141 import Base # The pieces joined with sep between them. join undoes split: # join(split(xs, sep), sep) == xs (the other way round fails when a piece holds # sep). def join(ps: List<&2, List<&2, U32>>, +sep: U32) -> List<&2, U32>: match ps: case Nil{}: Nil{} case Con{p, t}: List.append(&2, U32, p, join.go(t, 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=List.append https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=lawful-fields@0.1.1.0/defs.bend&name=join.go