From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Vinicius Jose Latorre Newsgroups: gmane.emacs.devel Subject: Re: request for a new function, say, `sequence' Date: Fri, 04 Apr 2003 23:10:27 -0300 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <3E8E3B13.2060805@ig.com.br> References: <200303230302.MAA04327@etlken.m17n.org> <200303241541.h2OFfbpa011227@rum.cs.yale.edu> <200303250015.JAA06592@etlken.m17n.org> <200303250050.JAA06631@etlken.m17n.org> <200303250057.h2P0vBj6016367@rum.cs.yale.edu> <200303250125.KAA06703@etlken.m17n.org> <32627.1048557446@theforce.Stanford.EDU> <200303250208.LAA06802@etlken.m17n.org> <1191.1048560083@theforce.Stanford.EDU> <200303250446.NAA06974@etlken.m17n.org> <200303261218.VAA09242@etlken.m17n.org> <3E8CE9E6.1080507@ig.com.br> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1049508546 1698 80.91.224.249 (5 Apr 2003 02:09:06 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sat, 5 Apr 2003 02:09:06 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Sat Apr 05 04:09:04 2003 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 191d7A-0000RG-00 for ; Sat, 05 Apr 2003 04:09:04 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 191d9U-0008GR-00 for ; Sat, 05 Apr 2003 04:11:28 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 191d7H-0000fX-01 for emacs-devel@quimby.gnus.org; Fri, 04 Apr 2003 21:09:11 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 191d6r-0000OT-00 for emacs-devel@gnu.org; Fri, 04 Apr 2003 21:08:45 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 191d6Z-0008Qu-00 for emacs-devel@gnu.org; Fri, 04 Apr 2003 21:08:28 -0500 Original-Received: from toole.uol.com.br ([200.221.29.26]) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 191d6P-0008D3-00; Fri, 04 Apr 2003 21:08:17 -0500 Original-Received: from ig.com.br ([200.98.58.252]) by toole.uol.com.br (8.9.1/8.9.1) with ESMTP id XAA03130; Fri, 4 Apr 2003 23:08:13 -0300 (BRT) User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3) Gecko/20030312 X-Accept-Language: en-us, en Original-To: rms@gnu.org In-Reply-To: Original-cc: handa@m17n.org Original-cc: ttn@glug.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Emacs development discussions. List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:12908 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:12908 Richard Stallman wrote: >Your code looks the cleanest; please install it. > >Has someone updated etc/NEWS? > Done. See the doc associated: (defun number-sequence (from &optional to inc) "Return a sequence of numbers from FROM to TO (both inclusive) as a list. INC is the increment used between numbers in the sequence. So, the Nth element of the list is (+ FROM (* N INC)) where N counts from zero. If INC is nil, it defaults to 1 (one). If TO is nil, it defaults to FROM. If TO is less than FROM, the value is nil. Note that FROM, TO and INC can be integer or float." (if (not to) (list from) (or inc (setq inc 1)) (let (seq) (while (<= from to) (setq seq (cons from seq) from (+ from inc))) (nreverse seq))))