On Fri, Sep 11, 2015 at 12:12 AM, Nicolas Petton <nicolas@petton.fr> wrote:
Simen Heggestøyl <simenheg@gmail.com> 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