aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorArtur Malabarba2015-10-28 14:27:39 +0000
committerArtur Malabarba2015-10-28 15:40:23 +0000
commit7dfe247864f12b93b906edb5934af3c356acade4 (patch)
tree49ecd679906aae8113b8381fe93b91ddde51b648 /doc
parent4281f722dd782d91f4b2bbd03834cbd1d944db5c (diff)
downloademacs-7dfe247864f12b93b906edb5934af3c356acade4.tar.gz
emacs-7dfe247864f12b93b906edb5934af3c356acade4.zip
* lisp/emacs-lisp/seq.el (seq-mapn): New function
* doc/lispref/sequences.texi (Sequence Functions): Document seq-mapn
Diffstat (limited to 'doc')
-rw-r--r--doc/lispref/sequences.texi18
1 files changed, 18 insertions, 0 deletions
diff --git a/doc/lispref/sequences.texi b/doc/lispref/sequences.texi
index 8ecae7b58b5..730dac10452 100644
--- a/doc/lispref/sequences.texi
+++ b/doc/lispref/sequences.texi
@@ -572,6 +572,24 @@ 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-mapn function &rest sequences
576 This function returns the result of applying @var{function} to each
577element of @var{sequences}. The arity of @var{function} must match
578the number of sequences. Mapping stops at the shrotest sequence, and
579the returned value is a list.
580
581@example
582@group
583(seq-mapn #'+ '(2 4 6) '(20 40 60))
584@result{} (22 44 66)
585@end group
586@group
587(seq-mapn #'concat '("moskito" "bite") ["bee" "sting"])
588@result{} ("moskitobee" "bitesting")
589@end group
590@end example
591@end defun
592
575@defun seq-filter predicate sequence 593@defun seq-filter predicate sequence
576@cindex filtering sequences 594@cindex filtering sequences
577 This function returns a list of all the elements in @var{sequence} 595 This function returns a list of all the elements in @var{sequence}