def Heap.from_list

bend-kit-collections@0.1.4.1 · heap.bend:78

import bend-kit-collections@0.1.4.1/heap.bend as Heap
import Base

78def Heap.from_list(~A: Data, ~le: A -> A -> Bool, xs: List<&2, A>) -> Heap<A>:
79  match xs:
80    case Nil{}:
81      HLeaf{}
82    case h <> t:
83      Heap.push(~A, ~le, h, Heap.from_list(~A, ~le, t))

Uses (4)

Used by (1)