diff options
| author | Nicolas Petton | 2016-02-14 10:28:26 +0100 |
|---|---|---|
| committer | Nicolas Petton | 2016-02-14 10:33:13 +0100 |
| commit | ba1422e12f80ae1eb2aa9d0ce80c14e3ee4b3950 (patch) | |
| tree | 0c2df15b7f743246d13ca2cb1bd1510277839726 | |
| parent | 30fe90fa3c8f814a30a5136089b995b0a26f5cd0 (diff) | |
| download | emacs-ba1422e12f80ae1eb2aa9d0ce80c14e3ee4b3950.tar.gz emacs-ba1422e12f80ae1eb2aa9d0ce80c14e3ee4b3950.zip | |
* doc/lispref/sequences.texi: Add documentation for seq-map-indexed
| -rw-r--r-- | 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 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. | |||
| 572 | @end example | 572 | @end example |
| 573 | @end defun | 573 | @end defun |
| 574 | 574 | ||
| 575 | @defun seq-map-indexed function sequence | ||
| 576 | This function returns the result of applying @var{function} to each | ||
| 577 | element of @var{sequence} and its index within @var{seq}. The | ||
| 578 | returned value is a list. | ||
| 579 | |||
| 580 | @example | ||
| 581 | @group | ||
| 582 | (seq-map-indexed (lambda (elt idx) | ||
| 583 | (list idx elt)) | ||
| 584 | '(a b c)) | ||
| 585 | @result{} ((0 a) (b 1) (c 2)) | ||
| 586 | @end group | ||
| 587 | @end example | ||
| 588 | @end defun | ||
| 589 | |||
| 575 | @defun seq-mapn function &rest sequences | 590 | @defun seq-mapn function &rest sequences |
| 576 | This function returns the result of applying @var{function} to each | 591 | This function returns the result of applying @var{function} to each |
| 577 | element of @var{sequences}. The arity of @var{function} must match | 592 | element of @var{sequences}. The arity of @var{function} must match |