]> git.lizzy.rs Git - rust.git/commit
iter: Implement .fold() for .chain()
authorUlrik Sverdrup <bluss@users.noreply.github.com>
Tue, 25 Oct 2016 13:21:49 +0000 (15:21 +0200)
committerUlrik Sverdrup <bluss@users.noreply.github.com>
Tue, 25 Oct 2016 20:06:39 +0000 (22:06 +0200)
commita16626fc422f9fdcd1d02f56b628f764d5282261
tree2906da152b755dd46bef34a1f9361b75128650a4
parent780acda325772b15f12f08f60ca2d4ba558cee51
iter: Implement .fold() for .chain()

Chain can do something interesting here where it passes on the fold
into its inner iterators.

The lets the underlying iterator's custom fold() be used, and skips the
regular chain logic in next.
src/libcore/iter/mod.rs
src/libcoretest/iter.rs