def HMap.leaf

bend-kit-collections@0.1.4.1 · hmap.bend:148

import bend-kit-collections@0.1.4.1/hmap.bend as Hmap
import 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}

Uses (4)

Used by (5)