Closed ajaychandran closed 4 months ago
I'm not sure how using the same name for wrapAll
would play with overloading. Also I don't think replacing the old apply
/assume
with this implementation is a good idea because it would break binary compatibility and probably mess with type inference.
I suggest to use another name like applyF
/assumeF
or wrapAll
.
+1 for applyF/assumeF
.
After trying to implement it, I don't think it is possible to implement applyF
without requiring something like a Monad
/ForEach
typeclass because wrapAll
is not equivalent to applyF
. It is similar to assumeF
(aka just an alias for asInstanceOf[F[A]]
).
I was thinking that applyF
would have the same the same implementation (asInstanceOf[F[A]]
) but I see now how this can be confusing.
I am fine with just assumeF
. Also, it would be nice to have an extension method of the same name.
Sounds like a good (and useful) idea to me.
Is there an equivalent of
wrapAll
operator from zio-prelude?Describe the solution you'd like