Ryan Bloor:
> Data Tree a = Empty | Leaf a | Node a [(Tree a)]

The Leaf constructor seems superfluous to me.  Any (Leaf x) value is equivalent
to (Node x []).  So I rather just have

    data Tree a = Empty | Node a [Tree a]

which will mean less work for your task of writing processing functions, too.

Kalman

----------------------------------------------------------------------
Get a free email account with anti spam protection.
http://www.bluebottle.com/tag/2

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to