sources.rs
SHA-256dc5d34e229e2fb6021d0af8b4464b7f0fb9c78968bd9d1faafd8f0eabebd6128
Malecule∅
Evidence
1//! Iterators that are sources (produce elements from parameters,
2//! not from another iterator).
3
4/// An iterator …
5:7… given closure.
6///
7/// Iterator element type is the return type of the closure.
8///
9/// ```
10/// use itertools::RepeatCall;
11///
12/// itertools::asser …
33:13… atCall { f: func }
34 }
35}
36
37impl<A, F> Iterator for RepeatCall<F> where
38 F: FnMut() -> A,
39{
⋯4 lines
62:31… ator builder: it has a mutable state value,
63/// and a closure with access to the state that produces the next value.
64///
65/// This more or less equivalent to a regular struct with an `Iterator`
66/// implementation, and is usefu …