[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to mapcar or across a list?
From: |
Barry Margolin |
Subject: |
Re: How to mapcar or across a list? |
Date: |
Wed, 15 Jul 2015 19:56:38 -0400 |
User-agent: |
MT-NewsWatcher/3.5.3b3 (Intel Mac OS X) |
In article <mailman.6968.1436991281.904.help-gnu-emacs@gnu.org>,
Marcin Borkowski <mbork@mbork.pl> wrote:
> Hi there,
>
> so here's my problem: I have a list of Boolean values, and I want to
> `mapcar' an `or' across it (IOW, I want to test whether at least one of
> them is true). Of course, (apply #'or my-list) does not work. Of
> course, I can (cl-reduce (lambda (x y) (or x y)) my-list) -- but is
> there a better method?
"mapcar" is not the right metaphor. It's for running the same function
separately on each element of a list, not for combining elements.
--
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
- Re: never use `eval' (was: Re: How to mapcar or across a list?), (continued)
- Re: never use `eval' (was: Re: How to mapcar or across a list?), Emanuel Berg, 2015/07/15
- Re: never use `eval' (was: Re: How to mapcar or across a list?), Emanuel Berg, 2015/07/16
- Message not available
- Re: never use `eval', Pascal J. Bourguignon, 2015/07/16
- Re: never use `eval', Emanuel Berg, 2015/07/16
- Re: never use `eval', Barry Margolin, 2015/07/17
- Re: never use `eval', Pascal J. Bourguignon, 2015/07/17
- Message not available
- Re: never use `eval', Pascal J. Bourguignon, 2015/07/15
- Re: never use `eval', Emanuel Berg, 2015/07/15
Re: How to mapcar or across a list?, Pascal J. Bourguignon, 2015/07/15
Re: How to mapcar or across a list?,
Barry Margolin <=