diff options
author | Nicolas Petton <nicolas@petton.fr> | 2015-03-09 12:46:29 +0100 |
---|---|---|
committer | Nicolas Petton <nicolas@petton.fr> | 2015-03-09 12:50:24 +0100 |
commit | b7ed48c3ce8e77acc08d4948684333bef3238d2d (patch) | |
tree | f391b49af05d99cdde85b933bdaeb1e6598d146c /doc | |
parent | 8854b9cf5283cac3e4a5a3726325a82b88c1fcb5 (diff) | |
download | emacs-b7ed48c3ce8e77acc08d4948684333bef3238d2d.tar.gz |
Add seq-into as a public function
* lisp/emacs-lisp/seq.el: Make seq-into a public function (replacing
seq--into)
* test/automated/seq-tests.el: Add tests for seq-into
* doc/lispref/sequences.texi: Add documentation for seq-into
Diffstat (limited to 'doc')
-rw-r--r-- | doc/lispref/ChangeLog | 5 | ||||
-rw-r--r-- | doc/lispref/sequences.texi | 22 |
2 files changed, 27 insertions, 0 deletions
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index 42bff7c865a..260656c6cf7 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog @@ -1,3 +1,8 @@ +2015-03-09 Nicolas Petton <nicolas@petton.fr> + + * sequences.texi (seq-into): Add documentation for the new + seq-into function. + 2015-03-03 Eli Zaretskii <eliz@gnu.org> * processes.texi (Synchronous Processes): Update documentation of diff --git a/doc/lispref/sequences.texi b/doc/lispref/sequences.texi index 04404f886e0..1af353590cf 100644 --- a/doc/lispref/sequences.texi +++ b/doc/lispref/sequences.texi @@ -740,6 +740,28 @@ of @var{sequence}. Keys are compared using @code{equal}. @end example @end defun +@defun seq-into sequence type + This function converts the sequence @var{sequence} into a sequence +of type @var{type}. @var{type} can be one of the following symbols: +@code{vector}, @code{string} or @code{list}. + +@example +@group +(seq-into [1 2 3] 'list) +@result{} (1 2 3) +@end group +@group +(seq-into nil 'vector) +@result{} [] +@end group +@group +(seq-into "hello" 'vector) +@result{} [104 101 108 108 111] +@end group +@end example +@end defun + + @defmac seq-doseq (var sequence [result]) body@dots{} @cindex sequence iteration This macro is like @code{dolist}, except that @var{sequence} can be a list, |