[][src]Function parze::maybe_map

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

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