G'day all.

Quoting PR Stanley <[EMAIL PROTECTED]>:

Fully lazy? Can you elaborate please?

Sure.  that code again:

    test1 = \n _ -> 1+n
    test2 = \n -> let x = n+1 in \_ -> x

Suppose we have:

    f g x = g x + g x

And we try two options:

    f (test1 4) 3
    f (test2 4) 3

In the first case, (1+4) will be evaluated twice.  In the second case, it
will only be evaluated once.

Cheers,
Andrew Bromage
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to