* Incorrect seq-map-indexed example in elisp manual
@ 2021-02-07 10:36 Petteri Hintsanen
2021-02-07 12:10 ` Lars Ingebrigtsen
0 siblings, 1 reply; 2+ messages in thread
From: Petteri Hintsanen @ 2021-02-07 10:36 UTC (permalink / raw)
To: emacs-devel
[-- Attachment #1: Type: text/plain, Size: 355 bytes --]
Dear list,
In Emacs Lisp manual Section 6.1, seq-map-indexed has the following
example:
(seq-map-indexed (lambda (elt idx)
(list idx elt))
'(a b c))
⇒ ((0 a) (b 1) (c 2))
It should evaluate to
⇒ ((0 a) (1 b) (2 c))
instead.
Patch attached.
Regards,
Petteri
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: seq-map-indexed.patch --]
[-- Type: text/x-diff, Size: 410 bytes --]
diff --git a/doc/lispref/sequences.texi b/doc/lispref/sequences.texi
index 0c74dbe2aa..545fd408f8 100644
--- a/doc/lispref/sequences.texi
+++ b/doc/lispref/sequences.texi
@@ -609,7 +609,7 @@ Sequence Functions
(seq-map-indexed (lambda (elt idx)
(list idx elt))
'(a b c))
-@result{} ((0 a) (b 1) (c 2))
+@result{} ((0 a) (1 b) (2 c))
@end group
@end example
@end defun
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: Incorrect seq-map-indexed example in elisp manual
2021-02-07 10:36 Incorrect seq-map-indexed example in elisp manual Petteri Hintsanen
@ 2021-02-07 12:10 ` Lars Ingebrigtsen
0 siblings, 0 replies; 2+ messages in thread
From: Lars Ingebrigtsen @ 2021-02-07 12:10 UTC (permalink / raw)
To: Petteri Hintsanen; +Cc: emacs-devel
Petteri Hintsanen <petterih@iki.fi> writes:
> [Quoted text removed due to X-No-Archive]
Thanks; patch applied to Emacs 27.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-02-07 12:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-07 10:36 Incorrect seq-map-indexed example in elisp manual Petteri Hintsanen
2021-02-07 12:10 ` Lars Ingebrigtsen
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).