[plt-scheme] tail position
If this (f x) is in tail position:
(define (f x)
(call-with-escape-continuation
(lambda (ec)
(let ([s (void)])
(set! s (make-string 1000000))
(collect-garbage)
(display (current-memory-use))
(newline)
(f x)))))
then why isn't this one?
(define (f x)
(let ([s (void)])
(call-with-escape-continuation
(lambda (ec)
(set! s (make-string 1000000))
(collect-garbage)
(display (current-memory-use))
(newline)
(f x)))))
The second example shows a 1MB increase at every iteration, while the
first one does not.
Daniel