
7 Jan
2005
7 Jan
'05
10:35 a.m.
Henning Thielemann wrote:
What about dropping Guards? :-) Are they necessary? Do they lead to more readable source code? Do they lead to more efficient code? I could perfectly live without them up to now.
I hardly need guards too, but their advantage is that they let pattern matching fail, resulting in trying out following patterns. case l of [i] | i /= 0 -> (/i) _ -> error "a single message here for all other cases" Cheers Christian