unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Michael Heerdegen <michael_heerdegen@web.de>
To: Shigeru Fukaya <shigeru.fukaya@gmail.com>
Cc: 40972@debbugs.gnu.org
Subject: bug#40972: 27.0.91; assoc TESTFN's args reversed?
Date: Thu, 30 Apr 2020 01:30:13 +0200	[thread overview]
Message-ID: <87sgglvpiy.fsf@web.de> (raw)
In-Reply-To: <47D61E6B43780AC31D0B86@gmail.com> (Shigeru Fukaya's message of "Thu, 30 Apr 2020 06:15:09 +0900")

Shigeru Fukaya <shigeru.fukaya@gmail.com> writes:

> It seems to me, for third argument of `assoc', arguments are passed in a
> reverse order.
>
> (assoc "assoc" '(("cl-assoc" A) ("cl-member" B))
>        (lambda (x y) (equal (concat "cl-" x) y)))
> ==> nil
>
> (assoc "assoc" '(("cl-assoc" A) ("cl-member" B))
>        (lambda (y x) (equal (concat "cl-" x) y)))
> ==> ("cl-assoc" A)
>
> Or, is this intended behavior??

Dunno what others expect, but note that your predicate is not an
equality predicate (it's not symmetric), and the docstring doesn't
specify a behavior for this case.

Michael.





  reply	other threads:[~2020-04-29 23:30 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-29 21:15 bug#40972: 27.0.91; assoc TESTFN's args reversed? Shigeru Fukaya
2020-04-29 23:30 ` Michael Heerdegen [this message]
2020-09-09 13:22   ` Stefan Kangas
2020-09-09 14:46 ` Mattias Engdegård
2020-09-09 15:18   ` Stefan Kangas
2020-09-09 15:51     ` Mattias Engdegård

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87sgglvpiy.fsf@web.de \
    --to=michael_heerdegen@web.de \
    --cc=40972@debbugs.gnu.org \
    --cc=shigeru.fukaya@gmail.com \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).