
31 Dec
2003
31 Dec
'03
7:21 p.m.
I tried posting this before but, from my point of view, it vanished. My apologies if it's a duplicate. In http://www.cs.uu.nl/~daan/download/parsec/parsec.html we read,
testOr2 = try (string "(a)") <|> string "(b)"
or an even better version:
testOr3 = do{ try (string "(a"); char ')'; return "(a)" } <|> string "(b)"
Why is the latter better? (BTW, I like Parsec. Thanks, Daan. (-:) -- Mark