Frame.split: def of bolt@1.27.0.0 Import: import bolt@1.27.0.0/src/lsp/frame.bend as Frame Lines 336-343 of bolt@1.27.0.0/src/lsp/frame.bend: https://jend.leeeet.dev/read.txt?path=bolt@1.27.0.0/src/lsp/frame.bend&start_line=336&end_line=343 import Base # the first ds bytes (reversed onto acc) and the rest, or not yet when there # are fewer. The count goes down a digit at a time: never a Nat of its size def split(xs: List<&2, U32>, +ds: List<&2, Digit>, +acc: List<&2, U32>) -> Cut: match xs: case Nil{}: split.on(count.zero(ds), [], acc, _u => More{}) case Con{+h, +t}: split.on(count.zero(ds), h <> t, acc, _u => split(t, untick(ds), h <> acc)) 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=U32 https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/lsp/frame.bend&name=Cut https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/lsp/frame.bend&name=Digit https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/lsp/frame.bend&name=count.zero https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/lsp/frame.bend&name=split.on https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/lsp/frame.bend&name=untick