=====================[ Continuations in Ruby ]===================== Ruby has continuations (just like it also has closures), although you need to add require "continuations" to use them. In recent versions, Ruby has been deprecating them in favor of "Fibers", but they are still usable in v. 2.3 (at least). We went through examples cont1.rb--cont3.rb in the ruby/ directory. Read cont4.rb on your own, and figure out what it does---then run it! :) In all these examples, and experiment with different arguments passed to cc.call and with different placement of the callcc. These examples illustrate the fact that continuations can be used to implement any classic kind of flow control (and some non-classic ones). [Suggestion:] Write the loop example (scheme/cont-loop.scm) and the DFT example (scheme/cont-dft.scm) in Ruby. Write the AMB example in Ruby! -----------------[ Blog posts about Ruby continuations ]----------------- A good one with a few basic examples: http://liufengyun.chaos-lab.com/prog/2013/10/23/continuation-in-ruby.html More blogposts: http://deadprogrammersociety.blogspot.com/2007/02/ruby-blocks-closures-and-continuations.html http://blog.ontoillogical.com/blog/2014/07/12/delimited-continuations-in-ruby/ http://blog.ontoillogical.com/blog/2014/07/21/delimited-continuations-in-ruby-part-2/ http://gnuu.org/2009/03/21/demystifying-continuations-in-ruby/ -- Too informal for my taste, but might help you anyway.