Comment Comment by jdcarr Ruby works out pretty nicely in that case! def order_list_by_predicate(l, &blk) l.partition{|i| blk.call(i)}.flatten end part(1..6) do |i| i % 2 == 1 end And you can always sort the incoming list if that's a requirement. parent jdcarr 8 years ago