Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimize or remove reduceMapM? #3200

Open
travisbrown opened this issue Dec 10, 2019 · 0 comments
Open

Optimize or remove reduceMapM? #3200

travisbrown opened this issue Dec 10, 2019 · 0 comments

Comments

@travisbrown
Copy link
Contributor

We currently have foldMapA and foldMapM methods with identical semantics (apart from the constraint), because the monadic implementation using tailRecM can be much faster than the implementation that can only use Applicative.

We've recently added a reduceMapA with a similarly loosened constraint (see #3141, #3150, and #3199). Right now reduceMapM and reduceMapA have identical implementations. It's probably the case that reduceMapM could be implemented more efficiently using tailRecM, and we should either do this or deprecate it, because otherwise there's no reason for it to exist and it's just confusing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant