pub fn sequence<A, B, I>(
    mut fst: impl Parser<A, I>,
    mut snd: impl Parser<B, I>,
) -> impl Parser<(A, B), I> {
    // equivalent to: `fst.and(snd)`
    move |input: I| {
        let (a, input) = fst.parse(input)?;
        let (b, input) = snd.parse(input)?;
        Some(((a, b), input))
    }
}
/// Sequences two parsers, one after the other, collecting both results.
Sequences two parsers, one after the other, collecting both results.
Sequences two parsers one after the other collecting both results .
pub fn sequence<A, B, I>(
    mut fst: impl Parser<A, I>,
    mut snd: impl Parser<B, I>,
) -> impl Parser<(A, B), I> {
    // equivalent to: `fst.and(snd)`
    move |input: I| {
        let (a, input) = fst.parse(input)?;
        let (b, input) = snd.parse(input)?;
        Some(((a, b), input))
    }
}
pub fn sequence < A , B , I > ( mut fst : impl Parser < A , I > , mut snd : impl Parser < B , I > , ) -> impl Parser < ( A , B ) , I > { // equivalent to: `fst.and(snd)` move | input : I | { let ( a , input ) = fst . parse ( input ) ? ; let ( b , input ) = snd . parse ( input ) ? ; Some ( ( ( a , b ) , input ) ) } }
Sequences two parsers, one after the other, collecting both results.
Sequences two parsers one after the other collecting both results .
fst
impl Parser<A, I>
snd
impl Parser<B, I>