pub fn many<F, P>(p: P) -> Many<F, P>
Expand description
Parses p
zero or more times returning a collection with the values from p
.
If the returned collection cannot be inferred type annotations must be supplied, either by
annotating the resulting type binding let collection: Vec<_> = ...
or by specializing when
calling many, many::<Vec<_>, _>(...)
let result = many(digit())
.parse("123A")
.map(|x| x.0);
assert_eq!(result, Ok(vec!['1', '2', '3']));