Function combine::parser::repeat::iterate[][src]

pub fn iterate<F, J, P, I, Q>(iterable: J, parser: P) -> Iterate<F, J, P> where
    P: FnMut(&J::Item, &mut I) -> Q,
    Q: Parser<I>,
    I: Stream,
    J: IntoIterator + Clone,
    F: Extend<Q::Output> + Default
Expand description

assert_eq!(
    iterate(0..3, |&i, _| count_min_max(i, i, any())).parse("abbccc"),
    Ok((vec!["".to_string(), "a".to_string(), "bb".to_string()], "ccc")),
);