def w8s.take

bend-osdev-bytes@0.1.1.0 · bytes.bend:411

import bend-osdev-bytes@0.1.1.0/bytes.bend as Bytes
import Base

411def w8s.take(n: Nat, ws: List<&2, OctByte>) -> List<&2, OctByte>:
412  match n:
413    case 0n:
414      Nil{}
415    case 1n+p:
416      match ws:
417        case Nil{}:
418          Nil{}
419        case Con{h, t}:
420          Con{h, w8s.take(p, t)}

Uses (3)

Used by (23)