[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Re: thoughts on a more generic Array#partition function

Yukihiro Matsumoto

7/3/2008 4:01:00 AM

Hi,

In message "Re: thoughts on a more generic Array#partition function"
on Thu, 3 Jul 2008 12:31:51 +0900, "Rudi Cilibrasi" <cilibrar@gmail.com> writes:

|An experiment in a more generic partition function. The current
|Array#partition function takes a code block and interprets the result
|in a boolean way to create two lists. What if the user wants to create
|more than two lists?

How about using group_by method found in 1.9/1.8.7?

matz.