# HG changeset patch # User Richard M. Stallman # Date 1058887430 0 # Node ID 8aed6a3b153d8d481d280c6296e6991304b37ef9 # Parent b0f308799955e24dc18b07c2739e1bceb759be72 (Building Lists): Add number-sequence. diff -r b0f308799955 -r 8aed6a3b153d lispref/lists.texi --- 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