mozilla/rust — pull request #8526 by blake2-ppc (2013-08-15 02:30:14+00:00)
Title: Update functions in Result and Either to be iterator-based

Retry of PR #8471

Replace the remaining functions marked for issue #8228 with similar functions that are iterator-based.

Change `either::{lefts, rights}` to be iterator-filtering instead of returning a vector.

Replace `map_vec`, `map_vec2`, `iter_vec2` in std::result with three functions:

* `result::collect` gathers `Iterator>` to `Result<~[V], U>`
* `result::fold` folds `Iterator>` to `Result`
* `result::fold_` folds `Iterator>` to `Result<(), E>`