streamly icon indicating copy to clipboard operation
streamly copied to clipboard

Add a Fold monad instance?

Open harendra-kumar opened this issue 5 months ago • 0 comments

Since Parser has a monad instance, Fold can also have one. We need to measure the performance and check at what point the direct style Fold/Parser monad becomes worse in performance compared to CPS. We can potentially have a static analysis tool to warn against heavier use of these.

Also, we can add a FoldK newtype wrapper over ParserK. If there is a significant difference in performance we can consider using a custom implementation of FoldK.

harendra-kumar avatar Feb 02 '24 17:02 harendra-kumar