def le32.head
import bend-osdev-bytes@0.1.1.0/bytes.bend as Bytesimport Base
import bend-osdev-word64@0.1.1.0/word64.bend as W
165def le32.head(xs: List<&2, U32>) -> Maybe<&2, U32>:
166 match xs:
167 case Con{a, Con{b, Con{c, Con{d, t}}}}:
168 Some{U32{W.W64.bits.cat(8n, 24n, bits8(a), W.W64.bits.cat(8n, 16n, bits8(b), W.W64.bits.cat(8n, 8n, bits8(c), bits8(d))))}}
169 case _:
170 None{}