Still learning haskell, and I cannot really see the difference between
data Tree a = Leaf a | Branch [Tree a]
and
data Tree a = Leaf a | Branch (Tree a) (Tree a)
What is best according to you? What is the implication of these two ways of writing ?
The branch of the first one holds a list of Trees, so potentially any number of subtrees. The 2nd is explicitly two subtrees, thus a binary tree.