summaryrefslogtreecommitdiff
path: root/doc/lispref/sequences.texi
diff options
context:
space:
mode:
Diffstat (limited to 'doc/lispref/sequences.texi')
-rw-r--r--doc/lispref/sequences.texi15
1 files changed, 15 insertions, 0 deletions
diff --git a/doc/lispref/sequences.texi b/doc/lispref/sequences.texi
index 9869fe4c510..002a9ceceec 100644
--- a/doc/lispref/sequences.texi
+++ b/doc/lispref/sequences.texi
@@ -572,6 +572,21 @@ element of @var{sequence}. The returned value is a list.
@end example
@end defun
+@defun seq-map-indexed function sequence
+ This function returns the result of applying @var{function} to each
+element of @var{sequence} and its index within @var{seq}. The
+returned value is a list.
+
+@example
+@group
+(seq-map-indexed (lambda (elt idx)
+ (list idx elt))
+ '(a b c))
+@result{} ((0 a) (b 1) (c 2))
+@end group
+@end example
+@end defun
+
@defun seq-mapn function &rest sequences
This function returns the result of applying @var{function} to each
element of @var{sequences}. The arity of @var{function} must match