def mask

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

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

354# masking every element of a list to 8 bits (the list layer's view)
355def mask(xs: List<&2, U32>) -> List<&2, U32>:
356  match xs:
357    case Nil{}:
358      Nil{}
359    case Con{h, t}:
360      Con{byte(h), mask(t)}

Uses (3)

Used by (108)