summaryrefslogtreecommitdiff
path: root/61-69/62.hs
blob: a1344c6193ae8c80476956a6f2a02d7a53ef301e (plain) (blame)
1
2
3
4
5
data Tree a = Empty | Branch a (Tree a) (Tree a) deriving (Show, Eq)

internals Empty = []
internals (Branch _ Empty Empty) = []
internals (Branch x l r) = x:internals l ++ internals r