"vasudevram" <vasudevram / gmail.com> writes: > Saw a few URLs which had some info, some of which I understood. But > like I said, personal viewpoints are good to have. Well, you probably ran across my old page from 2003 that does "amb" in ruby in a translated-straight-from-scheme way. But for a more recent look at what I can use callcc for, decode my "de-optimised" solution to ruby quiz number 84: http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/199337 That solution uses a few of the more obscure ruby tricks, such as singleton classes, the coerce and to_s methods, the inject method, etc., in addition to using continuations in a manner that's rather less civilized than nice structured co-routines or enumerators. To see what's going on, you might replace this line: (0 ... n).inject(n-1){ |q,p| with (0 ... n).inject(n-1){ |q,p| p [q,p] Actually, going through all the solutions to quiz 84 and decoding them all will give probably more of a ruby education than you'd reasonably want. (I keep meaning to write up a full dissection of each entry - I really think that doing that, and arranging the entries in the proper order, would make for a nice ruby crash course) My recent post to the list on "probability fun in ruby" also uses callcc, wrapped in a more rubyish version of amb I made after seeing how people implemented amb in quiz #70.