On (2008-04-12 04:20 +0900), David A. Black wrote:

> select is selecting all the even ones, and reject! is rejecting all
> the odd ones, and in both cases, you're seeing the results (the array
> with only the even ones; the array without the odd ones). In the case
> of reject! you're also seeing that the contents of the array have been
> replaced with the results of the reject operation.

Are you talking about your example or my example? They did different thing,
I'm not sure why your did what it did above.

> I think if you want a reject operation whose return value is the same
> as a select operation, you'll probably need to come up with a new
> method name :-)

The reject! in my example does mutable reject, as one would expect.
But it also returns the non-rejected entries (that is, those entries that
select for same block would return).

Again, I'm not sure if this as typical need for select as I think it is.
But if think of all applications where you need to split array to multiple
arrays in a way where no entry can be ever needed to put to multiple
arrays, it would be lot cheaper to reduce the array size while going
it through. Kinda like select + pop, if you want another way to think
of it.

Thanks,
-- 
  ++ytti