From: James Edward Gray II Date: 2007-11-28T22:36:30+09:00 Subject: Re: Ruby needs continuations... On Nov 28, 2007, at 7:00 AM, Austin Ziegler wrote: > On 11/28/07, Vitor Peres wrote: >> On Nov 28, 2007 10:30 AM, Just Another Victim of the Ambient >> Morality < >> ihatespam@hotmail.com> wrote: >>> How would one do this in Ruby? You can use .each_with_index >>> and index >>> the other list but that assumes that the other list is indexable, >>> which >>> only happens to be true of arrays but is not true in general. >>> I've thought >>> about implementing some Ruby equivalent of zip() (or preferably >>> izip()) and >>> discovered that I can't do so without continuations. > > Actually, Ruby 1.9 is losing continuations (hard to do with native > threads, expensive for stack frame manipulation in JRuby). That's not entirely true. In Ruby 1.9, continuations have been moved out of the core but are still available from a standard library. James Edward Gray II