pub fn not_a<'a, I, F>(predicate: F) -> Parser<'a, I, I>
where
	I: Clone + PartialEq + Display + Debug,
	F: Fn(I) -> bool + 'a,
{
	Parser::new(move |input: &'a [I], start: usize| {
		if let Some(s) = input.get(start) {
			if predicate(s.clone()) {
				Err(Error::Mismatch {
					message: format!("not_a predicate failed on: {}", s),
					position: start,
				})
			} else {
				Ok((s.clone(), start + 1))
			}
		} else {
			Err(Error::Incomplete)
		}
	})
}
/// Success when predicate returns false on current input symbol.
Success when predicate returns false on current input symbol.
Success when predicate returns false on current input symbol .
pub fn not_a<'a, I, F>(predicate: F) -> Parser<'a, I, I>
where
	I: Clone + PartialEq + Display + Debug,
	F: Fn(I) -> bool + 'a,
{
	Parser::new(move |input: &'a [I], start: usize| {
		if let Some(s) = input.get(start) {
			if predicate(s.clone()) {
				Err(Error::Mismatch {
					message: format!("not_a predicate failed on: {}", s),
					position: start,
				})
			} else {
				Ok((s.clone(), start + 1))
			}
		} else {
			Err(Error::Incomplete)
		}
	})
}
pub fn not_a < ' a , I , F > ( predicate : F ) -> Parser < ' a , I , I > where I : Clone + PartialEq + Display + Debug , F : Fn ( I ) -> bool + ' a , { Parser :: new ( move | input : & ' a [ I ] , start : usize | { if let Some ( s ) = input . get ( start ) { if predicate ( s . clone ( ) ) { Err ( Error :: Mismatch { message : format ! ( " " s ) , position : start , } ) } else { Ok ( ( s . clone ( ) , start + 1 ) ) } } else { Err ( Error :: Incomplete ) } } ) }
Success when predicate returns false on current input symbol.
Success when predicate returns false on current input symbol .
predicate
F