def cur.fold
import bend-osdev-acpi@0.1.1.0/aml_interp.bend as AmlInterpimport 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)))