Untitled

Run Settings
LanguageRaku
Language Version
Run Command
use nqp; # for proper R5RS semantics, run this once wrapping your main function sub run_main($f) { nqp::continuationreset(nqp::null(), nqp::getattr($f<>, Code, Q[$!do])); } sub callcc($f) { # first get the current continuation nqp::continuationcontrol(1, nqp::null(), -> $dcont { my $scheme_cont := -> $val { # when the scheme continuation is invoked, we need to *replace* # the current continuation with this one nqp::continuationcontrol(1, nqp::null(), -> $c { nqp::continuationinvoke($dcont, { $val }) }); }; nqp::continuationinvoke($dcont, { $f($scheme_cont) }); }); } callcc -> &f { for ^20 { if $_ == 15 { f(); } } }
Editor Settings
Theme
Key bindings
Full width
Lines