In many languages, if you write something line by line
if (foo() || bar() || foobar()) { /* do stuff */ }
and foo () returns true, then bar () and foobar () will not be evaluated.
Suppose I had the following Clojure code:
(let [a (simple-function args)
b (complex-function args)
c (too-lazy-to-optimize-this-function args)]
(or a b c))
If a evaluates to true, will b and c also be evaluated, or will they be ignored?
Thank!
source
share