def be32.head

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

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

172def be32.head(xs: List<&2, U32>) -> Maybe<&2, U32>:
173  match xs:
174    case Con{a, Con{b, Con{c, Con{d, t}}}}:
175      Some{U32{W.W64.bits.cat(8n, 24n, bits8(d), W.W64.bits.cat(8n, 16n, bits8(c), W.W64.bits.cat(8n, 8n, bits8(b), bits8(a))))}}
176    case _:
177      None{}

Uses (5)

Used by (8)