I have 2 classes: One which is a Tree which can have N subtrees, and BinaryTree can have at most 2 subtrees.
The classes are defined like so:
data Tree a = EmptyTree | Tree a [Tree a] deriving (Show, Ord, Eq)
data BinTree a = EmptyBin | Node a (BinTree a) (BinTree a) deriving (Show, Ord, Eq)
Is there a way I could convert a BinaryTree into a Tree?
Thanks