def cur.fold

bend-osdev-acpi@0.1.1.0 · aml_interp.bend:349

import bend-osdev-acpi@0.1.1.0/aml_interp.bend as AmlInterp
import Base
import bend-osdev-word64@0.1.1.0/word64.bend as W

349def cur.fold(xs: List<&2, U32>, +sh: Nat, acc: W.W64) -> W.W64:
350  match xs:
351    case Nil{}:
352      acc
353    case Con{h, t}:
354      cur.fold(t, Nat.add(sh, 8n), W.W64.or(acc, W.W64.shl(W.W64.from_u32(U32.and(h, 255)), sh)))

Uses (9)

Used by (1)