From: Sam Kong Date: 2007-01-08T17:12:12+09:00 Subject: Re: Grouping elements of an array? Hi William, William James wrote: > Without "require": > [ 1, 2, 3, 4, 5, 6, 7, 8 ].inject([[]]){|a,e| > a << [] if a.last.size==3; a.last << e; a} This looks really clever. I like it. Sam