[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Emacs-diffs] master 8aa0386: Add seq-find
From: |
Nicolas Petton |
Subject: |
Re: [Emacs-diffs] master 8aa0386: Add seq-find |
Date: |
Sun, 13 Sep 2015 16:09:13 +0200 |
User-agent: |
Notmuch/0.19 (http://notmuchmail.org) Emacs/25.0.50.5 (x86_64-unknown-linux-gnu) |
Stefan Monnier <address@hidden> writes:
>> + "Return the first element for which (PRED element) is non-nil in SEQ.
>> +If no element is found, return SENTINEL or nil.
>
> "return SENTINEL or nil" should be just "return SENTINEL".
>
> Not only it's shorter, but it's also more precise (the current text
> doesn't say when it returns SENTINEL and when it returns nil).
>
>> +Note that `seq-find' has an ambiguity if the found element is nil
>> +and if no SENTINEL is specified, as it cannot be known if an
>> +element was found or not."
>
> It's not just for nil but for the case where the found value is
> identical to SENTINEL.
Thanks, I'll improve the docstring.
Nico
--
Nicolas Petton
http://nicolas-petton.fr
signature.asc
Description: PGP signature