[plt-scheme] call/cc and generators

From: Skeptic . (skeptic2000 at hotmail.com)
Date: Fri Apr 30 21:10:44 EDT 2010


Hi,
Generators are often given as good usage of call/cc, but in many cases it seems to me that explicitly saving the state is simple enougth that capturing the continutation is not needed.
For example, if one wants to do something like (make-unfold-generator ...) it is easy to manage the unfold index inside a closure.
The only good counter-example I have seen and used before is a recursive tree traversal, in this case call/cc appears to be the only way to go. 
I'm curious if someone have other examples of generators where call/cc is a good solution (or any interesting not-too-complex usage of call/cc).
Thanks.

 		 	   		  
_________________________________________________________________
Emmenez vos contacts faire un tour. 
http://go.microsoft.com/?linkid=9724472
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20100430/1c99ef3b/attachment.html>

Posted on the users mailing list.