[][src]Function parze::maybe_map

pub fn maybe_map<'a, T: Clone + 'a, O: 'a, E: ParseError<'a, T> + 'a>(
    f: impl Fn(T) -> Option<O> + 'static
) -> Parser<'a, T, O, E>

A parser that accepts one symbol provided it passes the given test, mapping it to another symbol in the process.

This function is extremely powerful, and is actually a superset of several other parser functions defined in this crate. However, this power also makes it fairly awkward to use. You might be better served by another function.