You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I believe this may cause stackoverflow for huge enough data structure, however I don't think you should fix this.
def mapK[G[_]](fg: F ~> G): RebalanceCallback[G, A] = {
self match {
case Pure(a) => Pure(a)
case Bind(source, f) => Bind(source.mapK(fg), f andThen (_.mapK(fg)))
The text was updated successfully, but these errors were encountered:
// lazy source is needed to avoid StackOverflowError in mapK implementation
final case class Bind[F[_], S, +A](source: () => RebalanceCallback[F, S], fs: S => RebalanceCallback[F, A])
extends RebalanceCallback[F, A]
in scope of #135
and there are tests proving that it's stack safe now
@t3hnar says
The text was updated successfully, but these errors were encountered: