[plt-scheme] Make multiple attempts to open DrScheme join running process?

From: Todd O'Bryan (toddobryan at mac.com)
Date: Sun Feb 25 23:01:23 EST 2007

On Sun, 2007-02-25 at 21:09 -0600, Matthew Flatt wrote:
> Surely you mistyped the program? That should run in constant space.
> 
> But
> 
>  (define (recur x) 
>    (add1 (recur x)))
>  (recur 7)
> 
> should indeed use unbounded memory (and DrScheme executes it very
> "efficiently" :).

Whoops! You're right. The program I used to do testing was actually:

(define (recur x)
  (cons x (recur x)))

Not sure which of these is most efficient at eating up memory.



Posted on the users mailing list.