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

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to