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
Isaac Dupree wrote:
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)
On Sun, Aug 26, 2007 at 01:35:33PM +0100, Andrew Coppin wrote:
Isaac Dupree wrote:
Except that (for no particularly good reason) : is a reserved symbol
Really? That's interesting... AFAIK, according to the Report, it
shouldn't be.
It is; from
There is something called infix constructors and something else called
infix operators. I'm guessing that an infix operator is really a
function, and an infix constructor I don't know what it is. How would
you guys describe them?
(*) More questions.
I learned how to define (++), and then I