def at.head

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

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

94# the byte at offset i, if there is one
95def at.head(xs: List<&2, U32>) -> Maybe<&2, U32>:
96  match xs:
97    case Con{h, t}:
98      Some{byte(h)}
99    case Nil{}:
100      None{}

Uses (4)

Used by (4)