lux/data/struct/tree

Types

Tree

(type: (Tree a)
  {#value a
   #children (lux;List (Tree a))})

Macros

tree

## Tree literals.
(tree Int 10)

(tree Int {10 [20
               {30 []}
               40]})

Structs

(Eq<Tree> Eq<a>)

(All [a] (-> (lux/control/eq;Eq a) (lux/control/eq;Eq (Tree a))))

Values

(branch value children)

(All [a] (-> a (lux;List (Tree a)) (Tree a)))

(flatten tree)

(All [a] (-> (Tree a) (lux;List a)))

(leaf value)

(All [a] (-> a (Tree a)))