The paper I am reading uses the following in an instance declaration for parsers:
p >>= f = Parser (\cs -> concat [parse (f a) cs' |
(a,cs') <- parse p cs])
Isn't this the same as
p >>= f = Parser (\cs ->
[(a',cs'') | (a,cs') <- parse p cs,
(a',cs'') <- parse (f a) cs'])
?
If so, any guesses why they chose the more obscure form?
_______________________________________________
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell-cafe
