From: Martin DeMello Date: 2005-02-05T09:07:10+09:00 Subject: Re: iteration the ruby way Robert Klemme wrote: > >> puts b.inject{|x,y| print x, " -- ";y} > 1 -- 2 -- 3 -- 4 -- 5 Ah, nice. I always forget you can use inject both for the side effect and for the return value simultaneously - I usually use it as an either/or thing. martin