The usual and
and or
operators in Common Lisp will lazily evaluate their operands, e.g. the and
will stop once it encounters the first nil
. I am searching for an operator that does not work this way, but instead always evaluates all operands before returning a result. Is there something like this?
In C for example you have the lazy &&
and you have the bitwise &
, which can be used as a non-lazy alternative.
I know about logand
and bit-and
, but those do not work on boolean operands.
E.g.:
(and NIL (not-defined))
would not throw an error, but i want it to throw one.
In C for example you have the lazy &&
- it's not laziness but short-circuit – Utilitarianism