[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to mapcar or across a list?
From: |
Rasmus |
Subject: |
Re: How to mapcar or across a list? |
Date: |
Wed, 15 Jul 2015 22:42:13 +0200 |
User-agent: |
Gnus/5.130014 (Ma Gnus v0.14) Emacs/25.0.50 (gnu/linux) |
Marcin Borkowski <mbork@mbork.pl> writes:
> 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?
>
> BTW, my-list doesn't really exist: it is a result of `mapcar'ing
> a function taking some value and yielding a Boolean value, so bonus
> points if the method does not process the whole list.
Does cl-some and cl-every fit the bill?
Rasmus
--
Vote for Dick Taid in an election near you!
- How to mapcar or across a list?, Marcin Borkowski, 2015/07/15
- Re: How to mapcar or across a list?,
Rasmus <=
- Re: How to mapcar or across a list?, John Mastro, 2015/07/15
- Re: How to mapcar or across a list?, Emanuel Berg, 2015/07/15
- Message not available
- Re: How to mapcar or across a list?, Pascal J. Bourguignon, 2015/07/15
- Re: How to mapcar or across a list?, Emanuel Berg, 2015/07/15
- 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?), John Mastro, 2015/07/15
- 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?), John Mastro, 2015/07/15
- Message not available
- Re: never use `eval' (was: Re: How to mapcar or across a list?), Barry Margolin, 2015/07/15