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 | 10010 reads
|
Browse archives
Active forum topics |
Recent comments
13 weeks 3 days ago
13 weeks 3 days ago
13 weeks 3 days ago
35 weeks 4 days ago
39 weeks 6 days ago
41 weeks 3 days ago
41 weeks 3 days ago
44 weeks 1 day ago
48 weeks 5 days ago
48 weeks 5 days ago