def view

lawful-bytes@0.1.1.0 · defs.bend:22

import lawful-bytes@0.1.1.0/defs.bend as Defs
import Base
import lawful-arrays@0.1.0.0/defs.bend as A

22# What a Bytes holds: its first len bytes.
23def view(b: Bytes) -> List<&2, U32>:
24  Bytes{len, buf} = b
25  List.take(&2, U32, unpack(A.view(U32, buf)), U32.to_nat(len))

Uses (7)

Used by (96)