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
_______________________________________________
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to