3 ms·
Check out srfi-125 and the make-coroutine-generator: https://srfi.schemers.org/srfi-121/srfi-121.html https://srfi.schemers.org/srfi-121/srfi-121.html That is
by Johnny_Brahms 9y ago
Check out srfi-125 and the make-coroutine-generator: https://srfi.schemers.org/srfi-121/srfi-121.html https://srfi.schemers.org/srfi-121/srfi-121.html
That is implemented using call/cc, and even though it is mostly a convenience function, it shows how call/cc can be used.
It should be noted though, that call/cc is extremely expensive and prone to memory leaks. If you are using racket , scheme48 or guile you should use their delimited continuations instead.