From: "Hal E. Fulton" Date: 2003-03-25T14:25:53+09:00 Subject: Re: Iterate over two lists in parallel ----- Original Message ----- From: "Jim Weirich" To: "ruby-talk ML" Sent: Monday, March 24, 2003 7:50 PM Subject: Re: Iterate over two lists in parallel > Here's my take on this ... you can find an HTML version (that's a bit > more readable) at http://w3.one.net/~jweirich/talks/same_fringe/ Jim, I've been playing with this for about an hour, and I've only managed to convince myself that I don't actually understand it. What I tried to do was encapsulate this functionality in a module called Gen, so that I could, for instance, do this: class Array include Gen end x = [5, 6, 7, 8, 9] loop do a = x.get break if x.nil? p a end Yes, I know the loop is trivial and an internal iterator would suffice here. The point is that I can't figure out this simple task. :( Can you illuminate? Thanks, Hal