19 Jul
2010
19 Jul
'10
5:40 p.m.
Parsec has the CharParser - /integer/ - to avoid "many1 digit" and the like. You have to instantiate a TokenParser to use it - but for all but simplest parser the effort pays for itself. On 19 July 2010 09:14, David Virebayre <dav.vire+haskell@gmail.com> wrote:
That can be shortened to :
digitList :: Parser [Int] digitList = map ( read.(:[])) `fmap` many digit