examples - 0.0.0

Data.BinaryTree

Definitions

type BinaryTree (A : Type)Source#

Constructors

| leaf : BinaryTree A
| node : BinaryTree A -> A -> BinaryTree A -> BinaryTree A

fold {A B} (f : A -> B -> B -> B) (acc : B) : BinaryTree A -> BSource#

fold a tree in depth first order

length : {A : Type} -> BinaryTree A -> NatSource#

to-list : {A : Type} -> BinaryTree A -> List ASource#