If one guard expression in the guard fails, are the remaining expressions still evaluated?

Alexey Romanov alexey.v.romanov@REDACTED
Sun Feb 20 12:26:56 CET 2011


It seems natural to me that the answer should be no, because this
evaluation can't change the result and it doesn't have any side
effects by definition of guards. But while the reference manual
(http://www.erlang.org/doc/reference_manual/expressions.html)
explicitly says the rest of guards are not evaluated if one of them
succeeds, it doesn't say whether guards fail fast.

Yours, Alexey Romanov


More information about the erlang-questions mailing list