def uint.go

bend-kit-bytes@0.3.3.0 · bytes.bend:166

import bend-kit-bytes@0.3.3.0/bytes.bend as Bytes
import Base

166# n bytes from j, each shifted in below the ones before: the first byte read is the most significant.
167def uint.go(n: Nat, r: Array<U32> & U32, +j: U32, +up: Bool, +acc: U32) -> Array<U32> & U32:
168  match n:
169    case 0n:
170      (a, v) = r
171      (a, acc)
172    case 1n+p:
173      (a, +v) = r
174      uint.go(p, peek(a, step(up, j)), step(up, j), up, ((acc << 8n) .|. v : U32))

Uses (10)

Used by (4)