def hmap_distinct
import bend-kit-collections@0.1.4.1/LAWS.bend as LAWSimport Base
import bend-kit-collections@0.1.4.1/hmap.bend as M
495# No two entries of xs have equal keys.
496def hmap_distinct(~K: Data, ~V: Data, ~eq: K -> K -> Bool, xs: List<&2, M.Entry<K, V>>) -> Bool:
497 match xs:
498 case Nil{}:
499 True{}
500 case Con{M.Entry{+key, val}, +rest}:
501 hmap_absent(~K, ~V, ~eq, rest, key) && hmap_distinct(~K, ~V, ~eq, rest)