This is the mail archive of the kawa@sources.redhat.com mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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))


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]