Andrew Coppin wrote:
Daniel C. Bastos wrote:
But that won't compile, because it doesn't obey the syntax rules of
Haskell. You could, however, write
data List x = x : (List x) | End
and it would work.
1 : (2 : (3 : End))
Except that (for no particularly good reason) ":" is a reserved symbol
that always refers to the Prelude list version. You could define a
similar name like:
data List x = x :- (List x) | End
1 :- (2 :- (3 :- End))
Isaac
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe