Mercurial > emacs
changeset 52000:8aed6a3b153d
(Building Lists): Add number-sequence.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Tue, 22 Jul 2003 15:23:50 +0000 |
parents | b0f308799955 |
children | b96d92c96bd1 |
files | lispref/lists.texi |
diffstat | 1 files changed, 14 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/lispref/lists.texi Tue Jul 22 15:23:16 2003 +0000 +++ b/lispref/lists.texi Tue Jul 22 15:23:50 2003 +0000 @@ -733,6 +733,20 @@ destructively. See @ref{Sets And Lists}. @end defun +@defun number-sequence from to &optional separation +This returns a list of numbers starting with @var{from} +and incrementing by @var{separation} (or by 1 if @var{separation} +is @code{nil} or omitted), and ending at or just before @var{to}. +For example, + +@example +(number-sequence 4 9) + @result{} (4 5 6 7 8 9) +(number-sequence 1.5 6 2) + @result{} (1.5 3.5 5.5) +@end example +@end defun + @node Modifying Lists @section Modifying Existing List Structure @cindex destructive list operations