This is a demonstation of when ClojureScript's and is not lazy, but eagerly evaluates arguments.

There are two buttons, which execute nearly identical code. Both buttons end up calling an and macro. The first argument to and is the boolean literal false, and the second argument is to call a function.

The first button calls a function which logs and sets the text above. The second button logs, sets the text content, then explicitly returns true.

Only the first button works properly; the second button calls (explicit-return-value). We expect neither button to change the text above, nor put anything into the browser console log.

You can examine the ClojureScript code or the generated javascript.

This button calls (and false (impicit-return-value)), which doesn't call (impicit-return-value). This is all as expected.

This button calls (and false (explicit-return-value)), which executes the (explicit-return-value) portion. This is bad.

The generated javascript that's problematic is here:

var inst_9865 = and_test.and_test.explicit_return_value.call(null);
var inst_9866 = false && inst_9865;

We obviously don't want to call and_test.and_test.explicit_return_value before performing the and.