On Mon, Mar 04, 2013 at 09:06:18PM +0100, Andrea Fontana wrote: > If I understand it correctly something like: > > range.filter!(...).map!(...) > > browse range 2 times, one for filter and one for mapping doesn't it?
No, these algorithms are evaluated lazily (unless you put .array at the end). The range is only traversed once. > Is there a way to "parallelize" this kind of operations? What do you mean by "parallelize"? Run in multiple threads? I don't think you can do that, because the result of filter depends on what it gets from map. T -- Skill without imagination is craftsmanship and gives us many useful objects such as wickerwork picnic baskets. Imagination without skill gives us modern art. -- Tom Stoppard
