def slots

bend-collections-laws-crypto@1.0.0.0 · proofs/lib/array.bend:35

import bend-collections-laws-crypto@1.0.0.0/proofs/lib/array.bend as Array
import Base
import bend-collections-laws-crypto@1.0.0.0/spec/lib/common.bend as SC

35def slots(-T: Data, t: Tree<T>) -> List<&2, T>:
36  match t:
37    case TLeaf{x}:
38      Con{x, Nil{}}
39    case TNode{l, r}:
40      SC.append(T, slots(T, l), slots(T, r))

Uses (3)

Used by (20)