From: Drew Adams <drew.adams@oracle.com>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: 44330@debbugs.gnu.org
Subject: bug#44330: 26.3; doc string of `cl-some'
Date: Sun, 1 Nov 2020 09:45:50 -0800 (PST) [thread overview]
Message-ID: <00b77b5b-90eb-442a-84ed-f0e2d835c798@default> (raw)
In-Reply-To: <87361tdymf.fsf@gnus.org>
> > "Return true if PREDICATE is true of any element of SEQ or SEQs.
> > If so, return the true (non-nil) value returned by PREDICATE."
> > ^^^^^^^^^^^^^^^^^^^^^^^^^^^
> >
> > The second sentence is meaningless/underspecified. If the function
> > stops as soon as it finds the first element for which PREDICATE is
> > true then the doc should say that it returns the value returned by
> > PREDICATE _for that element_.
> >
> > Without specifying, in some way, for which element the application of
> > PREDICATE returns non-nil, "the value returned by PREDICATE" has no
> > meaning.
>
> I've now clarified the doc string here in Emacs 28.
>
> However, the function is not guaranteed to stop at the first non-nil
> predicate value, so that's not specified.
According to the definition of Common Lisp, it is
ABSOLUTELY guaranteed to do just that.
https://www.cs.cmu.edu/Groups/AI/html/cltl/clm/node143.html
`some' returns as soon as any invocation of predicate
returns a non-nil value; some returns that value.
If the end of a sequence is reached, some returns nil.
Thus, considered as a predicate, it is true if some
invocation of predicate is true.
And read more on that page - more about this guarantee,
and more about it applying to ALL of the functions some,
every, notany, and notevery.
Is this a bug with the implementation of `cl-some'?
Or is it a doc bug?
Does Emacs `cl-some' pretend to respect the CL
definition of `some'? If not, the doc should say
that explicitly, and it should spell out just how
it deviates from support of the standard.
(So far, this bug has, in effect, been declared
"won't fix".
prev parent reply other threads:[~2020-11-01 17:45 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-30 15:54 bug#44330: 26.3; doc string of `cl-some' Drew Adams
2020-11-01 12:56 ` Lars Ingebrigtsen
2020-11-01 17:17 ` Basil L. Contovounesios
2020-11-02 15:11 ` Lars Ingebrigtsen
2020-11-01 17:45 ` Drew Adams [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=00b77b5b-90eb-442a-84ed-f0e2d835c798@default \
--to=drew.adams@oracle.com \
--cc=44330@debbugs.gnu.org \
--cc=larsi@gnus.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.