17600c1ea7
Add iterator method .rfold(init, function); the reverse of fold rfold is the reverse version of fold. Fold allows iterators to implement a different (non-resumable) internal iteration when it is more efficient than the external iteration implemented through the next method. (Common examples are VecDeque and .chain()). Introduce rfold() so that the same customization is available for reverse iteration. This is achieved by both adding the method, and by having the Rev\<I> adaptor connect Rev::rfold → I::fold and Rev::fold → I::rfold. On the surface, rfold(..) is just .rev().fold(..), but the special case implementations allow a data structure specific fold to be used through for example .iter().rev(); we thus have gains even for users never calling exactly rfold themselves. |
||
---|---|---|
.. | ||
bootstrap | ||
build_helper | ||
ci | ||
doc | ||
etc | ||
grammar | ||
jemalloc@1f5a28755e | ||
liballoc | ||
liballoc_jemalloc | ||
liballoc_system | ||
libarena | ||
libbacktrace | ||
libcollections | ||
libcompiler_builtins@ef4951582f | ||
libcore | ||
libfmt_macros | ||
libgetopts | ||
libgraphviz | ||
liblibc@95848f9622 | ||
libpanic_abort | ||
libpanic_unwind | ||
libproc_macro | ||
libprofiler_builtins | ||
librand | ||
librustc | ||
librustc_allocator | ||
librustc_apfloat | ||
librustc_asan | ||
librustc_back | ||
librustc_borrowck | ||
librustc_const_eval | ||
librustc_const_math | ||
librustc_cratesio_shim | ||
librustc_data_structures | ||
librustc_driver | ||
librustc_errors | ||
librustc_incremental | ||
librustc_lint | ||
librustc_llvm | ||
librustc_lsan | ||
librustc_metadata | ||
librustc_mir | ||
librustc_msan | ||
librustc_passes | ||
librustc_platform_intrinsics | ||
librustc_plugin | ||
librustc_privacy | ||
librustc_resolve | ||
librustc_save_analysis | ||
librustc_trans | ||
librustc_trans_utils | ||
librustc_tsan | ||
librustc_typeck | ||
librustdoc | ||
libserialize | ||
libstd | ||
libstd_unicode | ||
libsyntax | ||
libsyntax_ext | ||
libsyntax_pos | ||
libterm | ||
libtest | ||
libunwind | ||
llvm@d9e7d2696e | ||
rt | ||
rtstartup | ||
rustc | ||
rustllvm | ||
test | ||
tools | ||
Cargo.lock | ||
Cargo.toml | ||
stage0.txt |