[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master ba1422e 2/2: * doc/lispref/sequences.texi: Add docu
From: |
Nicolas Petton |
Subject: |
[Emacs-diffs] master ba1422e 2/2: * doc/lispref/sequences.texi: Add documentation for seq-map-indexed |
Date: |
Sun, 14 Feb 2016 09:35:48 +0000 |
branch: master
commit ba1422e12f80ae1eb2aa9d0ce80c14e3ee4b3950
Author: Nicolas Petton <address@hidden>
Commit: Nicolas Petton <address@hidden>
* doc/lispref/sequences.texi: Add documentation for seq-map-indexed
---
doc/lispref/sequences.texi | 15 +++++++++++++++
1 files changed, 15 insertions(+), 0 deletions(-)
diff --git a/doc/lispref/sequences.texi b/doc/lispref/sequences.texi
index 9869fe4..002a9ce 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
address@hidden 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.
+
address@hidden
address@hidden
+(seq-map-indexed (lambda (elt idx)
+ (list idx elt))
+ '(a b c))
address@hidden ((0 a) (b 1) (c 2))
address@hidden group
address@hidden example
address@hidden 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