[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Checking if all values of a list are true
From: |
Nordlöw |
Subject: |
Re: Checking if all values of a list are true |
Date: |
Fri, 11 Jul 2008 04:37:20 -0700 (PDT) |
User-agent: |
G2/1.0 |
On 11 Juli, 13:33, Nordlöw <per.nord...@gmail.com> wrote:
> On 11 Juli, 13:23, Nordlöw <per.nord...@gmail.com> wrote:
>
> > How do I check if all values of a list are true?
>
> > This is my attempt:
> > (reduce 'and '(t t))
>
> > but I get the error: and (invalid-function and)
>
> > (functionp 'and)
>
> > gives true so why on earth doesn't this work?
>
> > Thanks in advance,
> > Nordlöw
>
> Is there an alternative pure emacs-lisp way (non common-lisp (cl)) of
> doing this?
>
> /Nordlöw
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.
/Nordlöw