def HMap.leaf
import bend-kit-collections@0.1.4.1/hmap.bend as Hmapimport Base
148# An emptied bucket becomes HNil.
149def HMap.leaf(-K: Data, -V: Data, +hash: U32, xs: List<&2, Entry<K, V>>) -> HMap<K, V>:
150 match xs:
151 case Nil{}:
152 HNil{}
153 case Con{e, rest}:
154 HLeaf{hash, e <> rest}