def OMap.to_list.go
import bend-kit-collections@0.1.4.1/omap.bend as Omapimport Base
215def OMap.to_list.go(
216 -K: Data, -V: Data, m: OMap<K, V>, acc: List<&1, K & V>
217) -> List<&1, K & V>:
218 match m:
219 case OTip{}:
220 acc
221 case OBin{s, k, v, lo, hi}:
222 OMap.to_list.go(K, V, lo, (k, v) <> OMap.to_list.go(K, V, hi, acc))