On Thu, 10 Mar 2005 22:06:10 +0900, ts <decoux / moulon.inra.fr> wrote:
> >>>>> "B" == =?ISO-8859-1?Q?Brian Schr=F6der?= <ISO-8859-1> writes:
> 
> B> Or in simple cases where the additional memory overhead is not
> B> important, you can also use the zip funtion. I.e.
> 
> B> %w(eins zwei drei).zip([1,2,3]).each do | name, value |
> B>   puts "The value of #{name} is #{value}"
> B> end
> 
>  Why do you use #each ?
> 
> svg% ruby -e '%w(eins zwei drei).zip([1,2,3]) {|a, b| puts "#{a} #{b}" }'
> eins 1
> zwei 2
> drei 3
> svg%
> 
>  no memory overhead
> 
> Guy Decoux
> 
> 

Thank you, I thought that was something not yet in the standard lib.
Wasn't there a discussion about this on this list not so long ago?
Anyway, learned something more.

regards,

Brian

-- 
Brian Schröäer
http://ruby.brian-schroeder.de/