Arc Forumnew | comments | leaders | submitlogin
Delimited continuations tutorial (schemewiki.org)
4 points by akkartik 5065 days ago | 1 comment


2 points by Pauan 5063 days ago | link

I noticed at the end of the article that it mentioned that PLT Scheme had already implemented reset and shift in a library... Sure enough, in /usr/lib/plt/collects/mzlib/control.ss, I found the implementation.

I then shamelessly copied it and modified it so it would work in Arc. Not sure if that counts as copyright infringement, but either way I'm fine with releasing it under the LGPL. The result is composable.arc, which can be found on my lib branch:

https://github.com/Pauan/ar/blob/lib/composable.arc

So, now all you have to do is (use composable) and you can use shift and reset, just like the article demonstrates.

-----