> From: Yukihiro Matsumoto [mailto:matz / zetabits.com] [...] > In message "[ruby-talk:12374] Re: Haskell goodies, RCR and challenge" > on 01/03/10, Yukihiro Matsumoto <matz / zetabits.com> writes: > > || (0..4).to_a.partition {|e| e%2 == 0} # => [[0,2,4], [1,3]] > | > |I like this function. Although it's mere combination of "select" and > |"reject". But I don't prefer the word "partition" for the > |functionality. > > The method name should be verb, and preferably end with "ct" to rhyme > with other method names. e.g. "bisect"? > > matz. But, "partition" and can be verb too and is the gold standard mathematical term for this. On the other and if you have #bisect it makes also sense to define #bisect_at(i) which brings to me to #insert_at (i,arr) I would not mind to see in Array. Christoph