Here is a list of numbers that when takeD is called it will generate a list base off the previous list. For example if you say (takeD 3 L1) you will get a list (1 2 3). intlistNew creates a list from a different list starting from the number given. For example (takeD 3 (delay (intlistNew 3 100))) will return (3 4 5). I am trying to figure out a way to change intListNew that I don't need to type in 100 as an argument just 3. I can use your help. thanks.
(define L1 (list 1 2 3 4 5 6 7 8 9))
(define (takeD n L)
(if (= n 0) '()
(cons (car (force L)) (takeD (- n 1) (cdr (force L))))))
(define (intlistNew m n)
(if (> m n) '() (cons m (delay (intlistNew (+ 1 m) n)))))
(takeD 3 (delay (intlistNew 3 100)))