The parser
permute perm parses a permutation of parser
described by
perm. For example, suppose we want to parse a
permutation of: an optional string of
a's, the character
b and an optional
c. This can be described by:
test = permute (tuple <$?> ("",many1 (char 'a'))
<||> char 'b'
<|?> ('_',char 'c'))
where
tuple a b c = (a,b,c)