[Haskell-beginners] definition of data
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)?
data Tree a = a | Branch (Tree a) (Tree a) deriving Show
but it seems not accpetable in haskell ?
any way I could achieve this ?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Beginners