Xen / reference v0.1.0-demo.2
std.iter
This topic is not available in the selected language or version. Showing the start of this section.
APIs documented for this release.
use std.iter;Add use std.iter; for .iter(), .into_iter(), .map(...), .filter(...), and .enumerate(). std.iter.fold<I, T, A>(iterator, initial, step) accumulates in order using a fn(A, T) -> A callback; empty input returns initial. std.iter.collect<I, T>(iterator) gathers items into a new vector. Supply all type arguments if they cannot be inferred. The collections chapter includes a runnable example.