unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#26440: seq-mapn fails with circular sequence
@ 2017-04-11  8:12 Phillip Lord
  2017-04-12  8:22 ` Nicolas Petton
  0 siblings, 1 reply; 4+ messages in thread
From: Phillip Lord @ 2017-04-11  8:12 UTC (permalink / raw)
  To: 26440

On Emacs-25 circular structures cause seq-mapn not to terminate
although the documentation suggest that they should.

Consider:

    (defvar l '(a c d))
    (setq l (nconc l l))
    (seq-mapn #'cons l '(1))

This should return '((a . 1)) but actually does not terminate.

The problem is caused by call to seq-into which includes:

    (append sequence nil)

The problem does exist on trunk which does this instead:

    (if (listp sequence)
        sequence
      (append sequence nil)))








^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-08-01 18:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-04-11  8:12 bug#26440: seq-mapn fails with circular sequence Phillip Lord
2017-04-12  8:22 ` Nicolas Petton
2017-07-31 11:34   ` Nicolas Petton
2017-08-01 18:40     ` Nicolas Petton

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).