def tail

bend-kit-hash@0.3.0.2 · hash.bend:112

import bend-kit-hash@0.3.0.2/hash.bend as Hash
import Base

112# Folds f over the low k bytes of w, lowest first.
113def tail(~T: Type, ~f: T -> @+c: U32 -> T, k: Nat, +w: U32, acc: T) -> T:
114  match k:
115    case 0n:
116      acc
117    case 1n+p:
118      tail(~T, ~f, p, (w >> 8n : U32), f(acc, (w .&. 255 : U32)))

Uses (4)

Used by (3)