[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: seq-some-p and nil
From: |
Drew Adams |
Subject: |
RE: seq-some-p and nil |
Date: |
Tue, 8 Sep 2015 10:08:41 -0700 (PDT) |
> >> To make things easier to understand, I'm taking the example of finding
> >> the first odd number in a seq:
> >
> > I've never needed to do that.
>
> Marvelous.
;-)
Was there something wrong with the suggestion to return,
as the non-nil value, a cons (ELEMENT . VALUE)?
(Where ELEMENT is the sequence element that satisfies the
predicate, and VALUE is the return value of the predicate
for that element.)
That gives you "some" element that satisfies the predicate
(the first such). And it gives you the result of the test.
Each of these can be useful, depending on the context.
- Re: seq-some-p and nil, (continued)
- Re: seq-some-p and nil, Stefan Monnier, 2015/09/07
- Re: seq-some-p and nil, Mark Oteiza, 2015/09/07
- RE: seq-some-p and nil, Drew Adams, 2015/09/07
- Re: seq-some-p and nil, Nicolas Petton, 2015/09/07
- Re: seq-some-p and nil, Stefan Monnier, 2015/09/07
- Re: seq-some-p and nil, Nicolas Petton, 2015/09/08
- Re: seq-some-p and nil, Stefan Monnier, 2015/09/08
- Re: seq-some-p and nil, Nicolas Petton, 2015/09/08
- Re: seq-some-p and nil, Stefan Monnier, 2015/09/08
- Re: seq-some-p and nil, David Kastrup, 2015/09/08
- RE: seq-some-p and nil,
Drew Adams <=
- RE: seq-some-p and nil, Nicolas Petton, 2015/09/08
- RE: seq-some-p and nil, Drew Adams, 2015/09/08
- RE: seq-some-p and nil, Nicolas Petton, 2015/09/09
- RE: seq-some-p and nil, Drew Adams, 2015/09/09
- Re: seq-some-p and nil, Stefan Monnier, 2015/09/09
- RE: seq-some-p and nil, Drew Adams, 2015/09/09
- Re: seq-some-p and nil, Stefan Monnier, 2015/09/09
- RE: seq-some-p and nil, Drew Adams, 2015/09/09
- RE: seq-some-p and nil, Nicolas Petton, 2015/09/09
- Re: seq-some-p and nil, Stefan Monnier, 2015/09/08