satisfy is an Attoparsec parser combinator that accepts an input character when a supplied predicate succeeds. Use it when valid characters are defined by a condition rather than a fixed string. section 12.2.2
Parsing whitespace
A whitespace parser accepts exactly the characters allowed by the PNM format, then void discards the parsed character: `whitespace = void $ C8.satisfy $ \c -> c == ' ' || c == '\n' || c == '\t' || c == '\r' || c == '\v' || c == '\f'`. section 12.2.2
Listing 12.20 A parser to skip whitespaces
import Control.Monad (void)
...
whitespace :: Parser ()
whitespace =
void $ #1
C8.satisfy $ #2
\c -> #3
c == ' '
|| c == '\n'
|| c == '\t'
|| c == '\r'
|| c == '\v'
|| c == '\f'
whitespaces :: Parser ()
whitespaces = skipMany1 whitespace #4
Inspect the complete whitespace parser and see how satisfy combines with void and skipMany1. section 12.2.2
