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

foldRecM #98

Open
matthewleon opened this issue Feb 10, 2018 · 3 comments
Open

foldRecM #98

matthewleon opened this issue Feb 10, 2018 · 3 comments
Labels
status: blocked This issue or PR is blocked by something and cannot make progress. type: enhancement A new feature or addition.

Comments

@matthewleon
Copy link
Contributor

Generalize from Data.Array:

foldRecM :: forall m a b. Foldable f => MonadRec m => (a -> b -> m a) -> a -> f b -> m a
@matthewleon
Copy link
Contributor Author

Sadly, it seems that any generalized version of this will be hopelessly inefficient, repeatedly running a left fold over the collection.

@matthewleon
Copy link
Contributor Author

This should eventually be doable in a reasonable once (if?) default member implementations are part of the language, so leaving it up for now.

@JordanMartinez JordanMartinez added status: blocked This issue or PR is blocked by something and cannot make progress. type: enhancement A new feature or addition. labels Dec 4, 2021
@jamesdbrock
Copy link

I want this too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: blocked This issue or PR is blocked by something and cannot make progress. type: enhancement A new feature or addition.
Projects
None yet
Development

No branches or pull requests

3 participants