3 ms·
Doesn't Ruby have call/cc? (def which-answer-is-correct answers (let like-ruby-block (fn (answer index return) (when (is string.answer "42") (ret
by rincewind 18y ago
Doesn't Ruby have call/cc?
(def which-answer-is-correct answers
(let like-ruby-block
(fn (answer index return) (when (is string.answer "42") (return:+ index 1)))
(ccc [do1 "none of the above"
(on a answers (like-ruby-block a index _))])))
as a useful contribution to the topic: Python does not have a call/cc
and how would the return statement be scoped if the block was created inside a different function?