pub fn peek<A, I: Clone>(mut parser: impl Parser<A, I>) -> impl Parser<A, I> {
    move |input: I| {
        let (value, _) = parser.parse(input.clone())?;
        Some((value, input))
    }
}
/// Transforms a parser into a non-consuming one, allowing to parse ahead without consuming anything.
Transforms a parser into a non-consuming one, allowing to parse ahead without consuming anything.
Transforms a parser into a non - consuming one allowing to parse ahead without consuming anything .
pub fn peek<A, I: Clone>(mut parser: impl Parser<A, I>) -> impl Parser<A, I> {
    move |input: I| {
        let (value, _) = parser.parse(input.clone())?;
        Some((value, input))
    }
}
pub fn peek < A , I : Clone > ( mut parser : impl Parser < A , I > ) -> impl Parser < A , I > { move | input : I | { let ( value , _ ) = parser . parse ( input . clone ( ) ) ? ; Some ( ( value , input ) ) } }
Transforms a parser into a non-consuming one, allowing to parse ahead without consuming anything.
Transforms a parser into a non - consuming one allowing to parse ahead without consuming anything .
parser
impl Parser<A, I>