[erlang-questions] erlang / laziness

Jesper Louis Andersen jesper.louis.andersen@REDACTED
Sun Mar 2 15:16:14 CET 2014


On Sun, Mar 2, 2014 at 2:20 PM, Sergej Jurecko <sergej.jurecko@REDACTED>wrote:

> andalso will evaluate second expression only if first is true
> orelse will evaluate second expression only if first is false
>
> Nothing else is lazy from what I know.
>

`andalso` and `orelse` are short-circuiting. They are also tail-call
optimized (in most recent OTP releases).


-- 
J.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20140302/05507bec/attachment.htm>


More information about the erlang-questions mailing list