pub fn sep_by1<A, B, I: Clone>(
    mut delim: impl Parser<A, I>,
    mut within: impl Parser<B, I>,
) -> impl Parser<Vec<B>, I> {
    move |input: I| {
        let mut output = Vec::<B>::new();
        let (value, mut input) = within.parse(input)?;
        output.push(value);
        while let Some((value, next)) = delim
            .parse(input.clone())
            .and_then(|(_, input)| within.parse(input))
        {
            input = next;
            output.push(value);
        }
        Some((output, input))
    }
}
/// Parses one or more things, separated by an arbitrary delimiter.
Parses one or more things, separated by an arbitrary delimiter.
Parses one or more things separated by an arbitrary delimiter .
pub fn sep_by1<A, B, I: Clone>(
    mut delim: impl Parser<A, I>,
    mut within: impl Parser<B, I>,
) -> impl Parser<Vec<B>, I> {
    move |input: I| {
        let mut output = Vec::<B>::new();
        let (value, mut input) = within.parse(input)?;
        output.push(value);
        while let Some((value, next)) = delim
            .parse(input.clone())
            .and_then(|(_, input)| within.parse(input))
        {
            input = next;
            output.push(value);
        }
        Some((output, input))
    }
}
pub fn sep_by1 < A , B , I : Clone > ( mut delim : impl Parser < A , I > , mut within : impl Parser < B , I > , ) -> impl Parser < Vec < B > , I > { move | input : I | { let mut output = Vec :: < B > :: new ( ) ; let ( value , mut input ) = within . parse ( input ) ? ; output . push ( value ) ; while let Some ( ( value , next ) ) = delim . parse ( input . clone ( ) ) . and_then ( | ( _ , input ) | within . parse ( input ) ) { input = next ; output . push ( value ) ; } Some ( ( output , input ) ) } }
Parses one or more things, separated by an arbitrary delimiter.
Parses one or more things separated by an arbitrary delimiter .
delim
impl Parser<A, I>
within
impl Parser<B, I>