Joel VanderWerf wrote:

> It might be nice to have versions of collect and select and so on that
> _do_ delegate, so that you can chain them more efficiently, like a pipe,
> without generating large temporary arrays:
> 
>   (0..10000).delegate_collect { |x| x**2 }.select { |y| y > 1000 && y <
> 2000 }

How silly of me. The Enumerable tools package includes Enumerable#pipe
which does just this.

--
Joel VanderWerf                          California PATH, UC Berkeley
mailto:vjoel / path.berkeley.edu                     Ph. (510) 231-9446
http://www.path.berkeley.edu                       FAX (510) 231-9512