I'm trying to apply a logic function over a list, but:
(apply 'and some_list) give me
Invalid function: and.
There is a way to apply a logical function to a list?
Emacs Stack Exchange is a question and answer site for those using, extending or developing Emacs. It only takes a minute to sign up.Sign up to join this community
This is because
and is not a function (it is a special form).
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’.