[plt-scheme] pseudo statics

From: Jens Axel Søgaard (jensaxel at soegaard.net)
Date: Wed Jul 1 19:06:24 EDT 2009

Hi Hugh,

2009/7/1 Hugh Myers <hsmyers at gmail.com>

> Somewhere is a discussion about code like:
>
> (define counter
>    (let ((a 0))
>      (lambda ()
>        (set! a (+ 1 a))
>        a)))
>
> I just can't remember where! Anyone have any useful pointers or such?


Is this it?

http://schemecookbook.org/Cookbook/IdiomSharingState

-- 
Jens Axel Søgaard
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20090702/748af935/attachment.html>

Posted on the users mailing list.