def hash_acc

bend-collections-laws-crypto@1.0.0.0 · src/containers/hash_table.bend:68

import bend-collections-laws-crypto@1.0.0.0/src/containers/hash_table.bend as HashTable
import Base
import bend-collections-laws-crypto@1.0.0.0/src/math/hash.bend as HS

68def hash_acc(s: String, +h: U32, acc: String) -> String & U32:
69  match s:
70    case SNil{}:
71      (rev_onto(acc, SNil{}), h)
72    case SCon{Chr{+c}, t}:
73      hash_acc(t, HS.mix(h, c), SCon{Chr{c}, acc})

Uses (7)

Used by (1)