[Haskell-beginners] trees on Haskell : Do I understand it right ?
Roelof Wobben
r.wobben at home.nl
Thu Feb 26 13:21:19 UTC 2015
Hello,
Suppose we have this definition of a tree :
data MessageTree = Leaf
| Node MessageTree LogMessage MessageTree
deriving (Show, Eq)
let Message = LogMessage "E 1 this is a test error"
let Message = LogMessage "e 2 this is the second test error "
As I understand it right I can make the first entry like this :
first_entry = Node Messagetree Message Messagetree
And the second one like this second_entry = Node Message Messagetree
Message2 Messagetree ??
Roelof
More information about the Beginners
mailing list