This is the mail archive of the
kawa@sources.redhat.com
mailing list for the Kawa project.
iota patch
- From: Chris Dean <ctdean at mercedsystems dot com>
- To: Kawa List <kawa at sources dot redhat dot com>
- Date: Sat, 31 May 2003 22:24:00 -0700
- Subject: iota patch
The iota procedure should have a step parameter that defaults to 1. It
was defaulting to 0, so this patch fixes that problem.
Regards,
Chris Dean
Index: srfi1.scm
===================================================================
RCS file: /cvs/kawa/kawa/gnu/kawa/slib/srfi1.scm,v
retrieving revision 1.4
diff -u -r1.4 srfi1.scm
--- srfi1.scm 21 Mar 2003 19:37:05 -0000 1.4
+++ srfi1.scm 1 Jun 2003 05:21:03 -0000
@@ -276,7 +276,7 @@
;;; IOTA count [start step] (start start+step ... start+(count-1)*step)
-(define (iota count :: <integer> #!optional (start :: <number> 0) (step :: <number> 0))
+(define (iota count :: <integer> #!optional (start :: <number> 0) (step :: <number> 1))
(if (< count 0) (error "Negative step count" iota count))
(let ((last-val (+ start (* (- count 1) step))))
(do ((count count (- count 1))