diff options
| author | Richard M. Stallman | 2003-07-22 15:23:50 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2003-07-22 15:23:50 +0000 |
| commit | 1006f206691a9d2d7d9ead621889c700d70bfa41 (patch) | |
| tree | f5bd5ab3e1d7bb00e3f1e30fddc4c8ea3241adc9 | |
| parent | 66c0f0547b81362cfbe4cbad6a731a5b48481782 (diff) | |
| download | emacs-1006f206691a9d2d7d9ead621889c700d70bfa41.tar.gz emacs-1006f206691a9d2d7d9ead621889c700d70bfa41.zip | |
(Building Lists): Add number-sequence.
| -rw-r--r-- | lispref/lists.texi | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/lispref/lists.texi b/lispref/lists.texi index e30c7013a59..f332f13040d 100644 --- a/lispref/lists.texi +++ b/lispref/lists.texi | |||
| @@ -733,6 +733,20 @@ The function @code{delq} offers a way to perform this operation | |||
| 733 | destructively. See @ref{Sets And Lists}. | 733 | destructively. See @ref{Sets And Lists}. |
| 734 | @end defun | 734 | @end defun |
| 735 | 735 | ||
| 736 | @defun number-sequence from to &optional separation | ||
| 737 | This returns a list of numbers starting with @var{from} | ||
| 738 | and incrementing by @var{separation} (or by 1 if @var{separation} | ||
| 739 | is @code{nil} or omitted), and ending at or just before @var{to}. | ||
| 740 | For example, | ||
| 741 | |||
| 742 | @example | ||
| 743 | (number-sequence 4 9) | ||
| 744 | @result{} (4 5 6 7 8 9) | ||
| 745 | (number-sequence 1.5 6 2) | ||
| 746 | @result{} (1.5 3.5 5.5) | ||
| 747 | @end example | ||
| 748 | @end defun | ||
| 749 | |||
| 736 | @node Modifying Lists | 750 | @node Modifying Lists |
| 737 | @section Modifying Existing List Structure | 751 | @section Modifying Existing List Structure |
| 738 | @cindex destructive list operations | 752 | @cindex destructive list operations |