User loginNavigation |
Are you using delimited continuations?Recently, I used delimited continuations to do some "scope herding" in a little language I am implementing. In short, I wrote a pair of combinators enterBlock and bindLocal that use shift and reset (and Reader-monad features) to provide automatic scoping for block-local bindings. Through the magic of delimited continuations, code like this:
is (in effect) translated into code like this:
In the latter form, the scope of each local binding is expressed via the Reader monad's local combinator, which assures me that the binding's effects will not stray outside of the block established by enterBlock, regardless of how the block is exited. Given the number of recent papers on delimited continuations that have been discussed here on LtU, I was wondering what other nifty uses our readers may have found for them. Do you have a delimited-continuation trick or story to share? If so, what is it? Please do let us know! By tmoertel at 2005-09-13 21:40 | LtU Forum | previous forum topic | next forum topic | other blogs | 10049 reads
|
Browse archives
Active forum topics |
Recent comments
22 weeks 6 days ago
22 weeks 6 days ago
22 weeks 6 days ago
45 weeks 1 day ago
49 weeks 2 days ago
51 weeks 2 hours ago
51 weeks 2 hours ago
1 year 1 week ago
1 year 6 weeks ago
1 year 6 weeks ago