G'day all.
Quoting Duncan Coutts <[EMAIL PROTECTED]>:
> Or finally, the "it's what you want most often" argument.
How about the "it's the most natural thing" argument?
Pattern matching on the LHS of a function definitions looks, for all the
world, like a set of rewrite rules. That's because, in some sense, they
are.
In this definition:
f (x:xs) = 1 + f xs
f [] = []
Intuitively, the first rule should only "fire" if the expression being
evaluated conforms to the left-hand side.
A google search for "conformality check" may also help.
A potentially frightening thought is that something like the above
definition would make sense in a lazy _logic_ language.
Cheers,
Andrew Bromage
_______________________________________________
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell