gscheme/examples/allocate.scm

24 lines
331 B
Scheme
Raw Permalink Normal View History

2022-08-05 05:28:40 -04:00
(define l1 (list-n 500))
(define access-list
(lambda (l n)
(if (zero? n) l
(access-list (cdr l) (- n 1)))))
(set-cdr! (access-list l1 250) '())
(define l2 (list-n 500))
(define vectors
(lambda (mx)
(map (lambda (n) (make-vector n n))
(list-n mx))))
(vectors 100)
(list-n 1000)
(vectors 200)