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