Strictness

Ronny Wichers Schreur [email protected]
Fri, 15 Mar 2002 19:33:50 +0100


matt hellige writes (to the haskell mailing list):

>[..] consider:
>    sum 0 x = x
>    sum x y = x + y
>
>if the first argument is 0, we don't need to inspect the second
>argument at all.

But sum returns its second argument, so it's still strict in that
argument.



Cheers,

Ronny Wichers Schreur