On Mar 16, 2006, at 7:20 AM, Jim Weirich wrote: > I've been having a lot of fun with this quiz. Pit Capitain sent me a > improved version of Amb that is more "Rubyish" and much easier to read > (my original was a direct translation of the scheme version). Oh sure, you would do that after I summarized the trickier version. ;) > # Make a choice amoung a set of discrete values. > def choose(*choices) > choices.each { |choice| > callcc { |fk| > @back << fk > return choice > } > } > failure > end I tried to eliminate the outer continuation when I was summarizing, convinced it wasn't needed. My attempt wasn't successful though. : ( It's good to know I wasn't completely wrong. James Edward Gray II