Continuations are indeed interesting, but hard to implement unfortunately. As a recap of my merging attempts; base call/cc worked, but I got stuck at figuring how to get dynamic-wind and other extent-aware features working, and unfortunately had to stash it 2022-12-08, kt, 01:43 Duncan Mak via Kawa rašė: > There's a new SRFI effort on refining the continuation API: > > SRFI 226: Control Features (schemers.org) > > > It'd be interesting to look into implementing this SRFI for Kawa Scheme. > > On Mon, Aug 9, 2021 at 3:42 PM Per Bothner wrote: > > > A suggestion: Polish and check in the code in the calcc branch. > > Then change the interface so it is compatible that the tail-call API. > > Specifically change the generated "fragments" so each looks like: > > > > static Object stubNN(Procedure proc, CallContext ctx) throws > Throwable) > > { ... } > > > > and call each fragment using MethodHandle#invokeExact. > > > > Of course this is not trivial: The person(s) doing this have to > understand > > not just logic of callcc changes but also how applyToConsumerMethod and > > CallContext etc work, before they can synthesize them. > > -- > > --Per Bothner > > per@bothner.com http://per.bothner.com/ > > > > > -- > Duncan. >