From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Kevin Ryde Newsgroups: gmane.lisp.guile.devel Subject: doco srfi-1 iota Date: Tue, 08 Jul 2003 07:57:24 +1000 Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Message-ID: <871xx2ov97.fsf@zip.com.au> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: main.gmane.org 1057615772 15751 80.91.224.249 (7 Jul 2003 22:09:32 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 7 Jul 2003 22:09:32 +0000 (UTC) Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Tue Jul 08 00:09:31 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19ZeAs-00045u-00 for ; Tue, 08 Jul 2003 00:09:31 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.20) id 19ZeAR-0003Fo-Ki for guile-devel@m.gmane.org; Mon, 07 Jul 2003 18:09:03 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.20) id 19Ze8e-0002H0-TW for guile-devel@gnu.org; Mon, 07 Jul 2003 18:07:12 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.20) id 19Ze57-0000gO-6E for guile-devel@gnu.org; Mon, 07 Jul 2003 18:03:33 -0400 Original-Received: from snoopy.pacific.net.au ([61.8.0.36]) by monty-python.gnu.org with esmtp (Exim 4.20) id 19ZdzO-0006qx-Jm for guile-devel@gnu.org; Mon, 07 Jul 2003 17:57:38 -0400 Original-Received: from sunny.pacific.net.au (sunny.pacific.net.au [203.2.228.40]) h67LvXZY001666 for ; Tue, 8 Jul 2003 07:57:34 +1000 Original-Received: from wisma.pacific.net.au (wisma.pacific.net.au [210.23.129.72]) by sunny.pacific.net.au with ESMTP id h67LvXQg011278 for ; Tue, 8 Jul 2003 07:57:33 +1000 (EST) Original-Received: from localhost (ppp112.dyn228.pacific.net.au [203.143.228.112]) by wisma.pacific.net.au (8.12.9/8.12.9) with ESMTP id h67LvVnh004913 for ; Tue, 8 Jul 2003 07:57:32 +1000 (EST) Original-Received: from gg by localhost with local (Exim 3.35 #1 (Debian)) id 19ZdzB-0000bi-00; Tue, 08 Jul 2003 07:57:25 +1000 Original-To: guile-devel@gnu.org nX-Draft-From: ("nnml:guile-devel" "") Mail-Copies-To: never User-Agent: Gnus/5.090019 (Oort Gnus v0.19) Emacs/21.2 (gnu/linux) X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Developers list for Guile, the GNU extensibility library List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.lisp.guile.devel:2598 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.devel:2598 --=-=-= * srfi-modules.texi (SRFI-1 Constructors): In iota, reword a bit for clarity and add a couple of examples. I found the formula for each element less clear than it could be, and thought a couple of examples would be enough to illustrate what happens. - Scheme Procedure: iota count [start step] Return a list containing COUNT numbers, starting from START and adding STEP each time. The default START is 0, the default STEP is 1. For example, (iota 6) => (0 1 2 3 4 5) (iota 4 2.5 -2) => (2.5 0.5 -1.5 -3.5) This function takes its name from the corresponding primitive in the APL language. --=-=-= Content-Disposition: attachment; filename=srfi-modules.texi.iota.diff --- srfi-modules.texi.~1.18.~ 2003-06-05 01:47:08.000000000 +1000 +++ srfi-modules.texi 2003-07-06 11:53:08.000000000 +1000 @@ -220,12 +220,17 @@ @end deffn @deffn {Scheme Procedure} iota count [start step] -Return a list containing @var{count} elements, where each element is -calculated as follows: +Return a list containing @var{count} numbers, starting from +@var{start} and adding @var{step} each time. The default @var{start} +is 0, the default @var{step} is 1. For example, -@var{start} + (@var{count} - 1) * @var{step} +@example +(iota 6) @result{} (0 1 2 3 4 5) +(iota 4 2.5 -2) @result{} (2.5 0.5 -1.5 -3.5) +@end example -@var{start} defaults to 0 and @var{step} defaults to 1. +This function takes its name from the corresponding primitive in the +APL language. @end deffn --=-=-= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://mail.gnu.org/mailman/listinfo/guile-devel --=-=-=--