
26 Jul
2007
26 Jul
'07
12:18 p.m.
Jon Harrop wrote:
If you have a boolean-or expression:
a || b
will "a" be evaluated before "b" in Haskell as it is in other languages?
Yes, although the meaning of the phrase "evaluated before" is a bit tricky in a lazy language, so it's probably better to state it with denotational semantics alone: _|_ || b = _|_ Maybe you also want to know whether the second argument "is evaluated". This is answered by True || _|_ = True False || _|_ = _|_ Regards, apfelmus