[Top][All Lists]

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

Re: seq-some-p and nil

From: Simen Heggestøyl
Subject: Re: seq-some-p and nil
Date: Tue, 22 Sep 2015 19:17:52 +0200

On Fri, Sep 11, 2015 at 12:12 AM, Nicolas Petton <address@hidden> wrote:
Simen Heggestøyl <address@hidden> writes:
While we're on it, wouldn't seq-some be even more powerful if it guaranteed to return the value from the first matched element? Or would that somehow be difficult for some kinds of seqs?
I added another function seq-find that does just that. Cheers, Nico
Nicolas Petton http://nicolas-petton.fr

Ah, sorry, I should have been clearer. What I meant was that it could
guarantee to return the *first* non-nil value that resulted from
applying the predicate, like in CL.

So for instance, (seq-some #'1+ '(1 3 5)) could guarantee to return 2,
not 4 or 6.

(And still (seq-some #'null '(1 nil 2)) ⇒ t, unlike seq-find).

-- Simen

reply via email to

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