From: Taylor R. Campbell Date: Sat, 30 Aug 2008 19:33:25 +0000 (+0000) Subject: In IOTA, multiply the index by the increment, rather than adding X-Git-Tag: 20090517-FFI~203 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=0352b44f0ba5a7af194e846c3a0816519b40ee96;p=mit-scheme.git In IOTA, multiply the index by the increment, rather than adding adding the increment repeatedly. --- diff --git a/v7/src/runtime/list.scm b/v7/src/runtime/list.scm index 179398969..fda2e9a2a 100644 --- a/v7/src/runtime/list.scm +++ b/v7/src/runtime/list.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: list.scm,v 14.58 2008/02/10 06:14:10 cph Exp $ +$Id: list.scm,v 14.59 2008/08/30 19:33:25 riastradh Exp $ Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, @@ -148,10 +148,7 @@ USA. (begin (guarantee-number step 'IOTA) step)))) - (let loop ((count count) (value start)) - (if (fix:> count 0) - (cons value (loop (fix:- count 1) (+ value step))) - '())))) + (make-initialized-list count (lambda (index) (+ start (* index step)))))) (define (list? object) (let loop ((l1 object) (l2 object))