def hmap_hashed

bend-kit-collections@0.1.4.1 · LAWS.bend:503

import bend-kit-collections@0.1.4.1/LAWS.bend as LAWS
import Base
import bend-kit-collections@0.1.4.1/hmap.bend as M

503# Every key of xs hashes to h.
504def hmap_hashed(
505  ~K: Data, ~V: Data, ~hash: K -> U32, xs: List<&2, M.Entry<K, V>>, +h: U32
506) -> Bool:
507  match xs:
508    case Nil{}:
509      True{}
510    case Con{M.Entry{key, val}, rest}:
511      U32.is_eq(h, hash(key)) && hmap_hashed(~K, ~V, ~hash, rest, h)

Uses (6)

Used by (22)