def split.on

bolt@1.27.0.0 · src/lsp/frame.bend:327

import bolt@1.27.0.0/src/lsp/frame.bend as Frame
import Base

327# the bytes taken so far and the rest once the count is down to zero, else
328# what more gives
329def split.on(zz: Bool, xs: List<&2, U32>, acc: List<&2, U32>, more: Unit -> Cut) -> Cut:
330  match zz:
331    case True{}:
332      Whole{List.reverse(&2, U32, acc), xs}
333    case False{}:
334      more(Unit{})

Uses (6)

Used by (1)