-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Add more foldMapK shortcircuiting #3447
Comments
I can look into this if that's ok. |
@barambani please by all means do 😊 |
I have a couple of questions about this. Now that there's a def foldMapK[G[_], A, B](fa: F[A])(f: A => G[B])(implicit G: MonoidK[G]): G[B] =
foldRight(fa, Eval.now(G.empty[B])) { (a, evalGb) =>
G.combineKEval(f(a), evalGb)
}.value instead of specializing it in the instances would break any assumption (the tests and Mima checks pass). It would delegate the short circuiting behavior to the More than happy to proceed in any way. Thanks. |
@barambani great catch, I think that should be fine if it passes the |
Makes sense. Thanks a lot :). |
We added short-circuting for Vector and List in #3446, but it's still missing a few others, namely:
The text was updated successfully, but these errors were encountered: