[Top][All Lists]

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

Re: seq-some-p and nil

From: Stefan Monnier
Subject: Re: seq-some-p and nil
Date: Mon, 07 Sep 2015 18:27:02 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

>> Returning what FUN returned seems like a better choice.
>> If you need the element matched, then you can simply arrange for FUN
>> to return the element.
> There is a misunderstanding here I think.
> The way I see it, they are two different functions: the (new) seq-some,
> and this other function that is now missing in seq, with the new
> implementation of `seq-some'.

I don't think so.  Both functions can be one and the same.
If you really want seq-find, you can define it as

  (defun seq-find (pred seq)
    (seq-some (lambda (x) (and (funcall pred x) x)) seq))

But I'm far from convinced it's worth having them both,


reply via email to

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