[Haskell-beginners] definition of data
Max.cs
max.cs.2009 at googlemail.com
Thu Jan 1 02:32:13 EST 2009
hi all, I want to define a data type Tree a that can either be a or Branch (Tree a) (Tree a)?
I tried
data Tree a = a | Branch (Tree a) (Tree a) deriving Show
but it seems not accpetable in haskell ?
any way I could achieve this ?
Thanks
max
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/beginners/attachments/20090101/11fad6a9/attachment.htm
More information about the Beginners
mailing list