I'm trying to apply a logic function over a list, but:
e.g.(apply 'and some_list)
give me Invalid function: and
.
There is a way to apply a logical function to a list?
I'm trying to apply a logic function over a list, but:
e.g.(apply 'and some_list)
give me Invalid function: and
.
There is a way to apply a logical function to a list?
This is because and
is not a function (it is a special form).
Note that C-h f and
tells you "and is a special form in `C source code'."
apply
must be used with a function.
The manual says:
‘apply’ returns the result of calling FUNCTION. As with ‘funcall’, FUNCTION must either be a Lisp function or a primitive function; special forms and macros do not make sense in ‘apply’.