
5 Nov
2009
5 Nov
'09
9:09 p.m.
No, consider the definition of (&&) -- I hope this is the def from the prelude. If it's not, then it's probably isomorphic... (&&) :: Bool -> Bool -> Bool True && x = x False && _ = False Since (&&) ignores it's second argument if the first is false, then it will "Short circuit" (like most `&` operators in other languages) due to lazy evaluation. /Joe On Nov 5, 2009, at 9:05 PM, Nathan M. Holden wrote:
If you have an if statement like
if (a&&b) then fun else fun'
and a is false, does GHC actually bother to check b? _______________________________________________ Beginners mailing list Beginners@haskell.org http://www.haskell.org/mailman/listinfo/beginners