-
Notifications
You must be signed in to change notification settings - Fork 66
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
ZIO.foreach and friends for a NonEmptyList #315
Comments
It doesn't seem like it can be done because implicit class search only happens if the method with the same name does not exist on the class, even if the type of the argument doesn't match. Example: https://scastie.scala-lang.org/6Qdbo7PhQwKkA2oOo2VM3g One weird thing that could enable this is providing implicit conversion You could also just use cats' |
Yeah, I thought about adding the implicit conversion to Iterable. I didn't realize the extension method trick wouldn't work... And we do use traverse for those places that expose NELs, but it would be nice having a consistency with ZIO. Anyway, thanks, I'll try seeing if adding a conversion will be enough! |
Perhaps we could provide it under a different name? |
If that would work for @hmemcpy too let's add a |
If you are using Cats / Cats Effect you can just do |
It would be great if this project could provide an extension for ZIO that added
ZIO.foreach/collectAll
etc for Cats NEL.The text was updated successfully, but these errors were encountered: