Hello Alexander,

> If you have a statement like:
> 
> result= a || b || c

It is better to speak of 'declarations'. There are no
statements in Haskell.

> does Haskell guarantee that a gets evaluated before b?

Yes, it does. You can think of (||) being defined as:

(||) :: Bool -> Bool -> Bool
True  || a = True
False || a = a

The left operand is evaluated first, because the pattern matches
forces this. The operator || associates to the right, so that
a || b || c is read as a || (b || c). Therefore, a will be
evaluated first.

Bye,
  Arjan


Reply via email to