Implement Foldable, monoid for parser
flip111 opened this issue · 2 comments
flip111 commented
Would be nice to be able to fold over a list of parsers.
When using endBy1 a sep where a is a string parser, would be nice to concat the result with fold
dwhitney commented
I've added a Semigroup instance in #38, which allows for a nicer syntax like parser1 <> parser2 <> parser3
hdgarrood commented
Since we have a Semigroup instance where append = lift2 append, it probably also makes sense to add a Monoid instance with mempty = pure mempty.