def hd.read

bend-kit-cbor@0.3.0.0 · cbor.bend:496

import bend-kit-cbor@0.3.0.0/cbor.bend as Cbor
import Base
import bend-kit-bytes@0.3.3.0/bytes.bend as Bytes

496def hd.read(ok: Bool, a: Array<U32>, +len: U32, +i: U32) -> Array<U32> & Maybe<&2, Hd>:
497  match ok:
498    case True{}:
499      hd.of(len, i, Bytes.peek(a, i))
500    case False{}:
501      (a, None{})

Uses (9)

Used by (1)