gscheme/scratch/allocate.scm~

19 lines
237 B
Scheme

(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))
;; (list-n 100)
(list-n 1000)
;; (list-n 200)