help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Checking if all values of a list are true


From: Joost Kremers
Subject: Re: Checking if all values of a list are true
Date: 11 Jul 2008 11:56:16 GMT
User-agent: slrn/0.9.8.1 (Linux)

Nordlöw wrote:
> It would be even better if Emacs already had a function typically
> named any-p(arg-list) that returned t if all values in arg-list are
> non-nil.

(defmacro all-true (lst)
  `(and ,@lst)

AND is not a function (or a macro) but a special form. in my emacs (GNU
Emacs 23.0.60.1), (functionp and) returns nil, not t. which is presumably
why functions such as reduce, funcall, mapcar etc. do not accept it as an
argument.


-- 
Joost Kremers                                      joostkremers@yahoo.com
Selbst in die Unterwelt dringt durch Spalten Licht
EN:SiS(9)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]