Is there any built in method that would combine the functions of Enumerable.select (find all which the block equates to true) and Enumerable.reject (find all which the block equates to false)?
Something like
good, bad = list.magic_method { |obj| obj.good? }
Looks as if
Enumerable.partitionis exactly what you are after.Interesting, I didn’t know that was there.
riis an amazing tool…