
15 Mar
2005
15 Mar
'05
10:47 a.m.
On Tue, Mar 15, 2005 at 03:44:55PM -0000, Nicola Whitehead wrote:
perhaps like this:
expr = do t <- term (do symbol "+" e <- expr return (t+e) ) +++ (return t)
although I think you may also want a 'try' before the first alternative.
No, that still gives the same undefined variable error. :(
Sometimes I prefer to write such code in a lispy way: expr = do t <- term ((+++) (do symbol "+" e <- expr return (t+e)) (return t)) Best regards Tomasz