#| -*-Scheme-*-
-$Id: list.scm,v 14.19 1994/02/16 07:57:01 gjr Exp $
+$Id: list.scm,v 14.20 1995/03/03 23:40:17 cph Exp $
Copyright (c) 1988-93 Massachusetts Institute of Technology
result)
(loop (- n 1) (cons value result))))))
'()))
+
+(define (make-initialized-list length initialization)
+ (guarantee-index length 'MAKE-INITIALIZED-LIST)
+ (let loop ((index (- length 1)) (result '()))
+ (if (negative? index)
+ result
+ (loop (- index 1)
+ (cons (initialization index) result)))))
\f
(define (list-ref list index)
(let ((tail (list-tail list index)))
#| -*-Scheme-*-
-$Id: runtime.pkg,v 14.248 1995/03/01 21:58:07 adams Exp $
+$Id: runtime.pkg,v 14.249 1995/03/03 23:40:44 cph Exp $
Copyright (c) 1988-95 Massachusetts Institute of Technology
list?
make-list
make-circular-list
+ make-initialized-list
map
map*
mapcan
#| -*-Scheme-*-
-$Id: runtime.pkg,v 14.248 1995/03/01 21:58:07 adams Exp $
+$Id: runtime.pkg,v 14.249 1995/03/03 23:40:44 cph Exp $
Copyright (c) 1988-95 Massachusetts Institute of Technology
list?
make-list
make-circular-list
+ make-initialized-list
map
map*
mapcan