User loginNavigation 
Generic implementation of all four *F* operators: from control0 to shiftUnlike the previous approaches, the latest implementation is generic. Shift and control share all the same code, and differ in only one boolean flag. Therefore, it becomes possible to mix different control operators in the same program. Furthermore, the latest implementation is direct rather than emulation (in terms of an objectlevel shift), therefore, it has the best performance. The code is surprisingly simple, compared with the previous implementation of 'control' by Sitaram and Felleisen, and does not require equality on continuations. All four delimited control operations do indeed reduce to call/cc and one global mutable cell, and hence have a quite simple CPS transform. That has been known since the paper by Chungchieh Shan (Scheme Workshop, 2004). The current code shows that result more directly. Oleg's implementation provides all four FriedmanFelleisen delimited control operators: from F (similar to cupto) to +F (aka control) to +F+ (aka shift). The R5RS Scheme code is parameterized by two boolean flags: isshift and keepdelimiteruponeffect. All four combinations of the two flags correspond to four delimited control operators. 
Browse archivesActive forum topicsNew forum topics

Recent comments
4 hours 1 min ago
5 hours 20 min ago
5 hours 42 min ago
9 hours 13 min ago
15 hours 5 min ago
15 hours 11 min ago
17 hours 6 min ago
1 day 2 hours ago
1 day 22 hours ago
2 days 8 hours ago