The question resulted from not quite understanding whats happening with (2) conditional functions: if & and.
AND is not a
conditional. AND is a
boolean function returning the logical AND operation of one or more expressions.
AND will return T if (and only if) all of the supplied expressions evaluate to a non-nil* value.
In your example you have the structure:
(if
(and
<expression1>
<expression2>
...
<expressionN>
)
(do_this)
(else_do_this)
)
Here, the 'test expression' is:
(and <expression1> <expression2> ... <expressionN>)
Hence, each of <expression1> ... <expressionN> must return a non-nil value for the AND function to return T, and hence for the test expression to be validated and the THEN expression to be subsequently evaluated.
This reads:
If (this AND this AND this AND ... AND this)
do_this
else_do_this
A possible (and
far less readable) re-write could be:
(if <expression1>
(if <expression2>
(if <expression3>
...
(if <expressionN>
(do_this)
(else_do_this)
)
...
)
)
)
However, apart from being extremely difficult to manage and maintain, the intent is far harder to ascertain.
[ *Note that expressions needn't evaluate explicitely to T, but anything non-nil, this could be a string, number, list (non-empty), etc, or even T. ]