[Haskell-cafe] Parsing problem

Eric eeoam at ukfsn.org
Fri Jun 27 12:02:27 EDT 2008


Daniel Fischer wrote:
> sat p = try $ do
>     (t,pos) <- item
>     if p t then return (t,pos) else pzero
>
> and you're all set (you don't need the try's in atom, then).
>   
Thanks, that works!

E.



More information about the Haskell-Cafe mailing list