def split.put

ezmcp@0.1.0.0 · src/line.bend:18

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

18# put a byte at the front of the first piece
19def split.put(byte: U32, ps: List<&2, List<&2, U32>>) -> List<&2, List<&2, U32>>:
20  match ps:
21    case []:
22      [[byte]]
23    case p <> rest:
24      (byte <> p) <> rest

Uses (2)

Used by (1)