Hi Miro,Originally posted in cdnusers.org by adbeckett
It's and() which is doing the eval on its arguments. and is a "syntax" form - this is because if you do something like:
it will work successfully if fred isn't defined - sometimes known in some languages as "expression short circuting" - it's only going to evaluate the second (or third, or fourth etc) argument if the preceding arguments are non-nil.
So when you do:
The list() doesn't get evaluated until the and decides it should be.
If you do:
apply('and list(list(1 2)))
then the list is evaluated before the apply gets called - and so the and call is like:
which is why you have the problem. You need to prevent the arguments from being evaluated.
So something like:
apply('and '(list(1 2)))
will do it. Chances are you wanted something to be evaluated in the argument though, so it might need to be something like:
apply('and `(list(,a ,b)))
Hope that helps!
Put simply, you have to be careful with using apply with syntax forms, nlambda functions, and macros, to make sure that the evaluation occurs at the right time.