hi there. Today, I tried to migrate my code from ...
# arrow
d
hi there. Today, I tried to migrate my code from 0.8.2 to 0.9.0. but I felt that my code using 0.9.0 is so-so... for instance, 0.8.2
Copy code
object Sample<ForDeferredK>, MonadThrow<ForDeferredK> by DeferredK.async()

interface Sample : MonadThrow<F> { // or MonadDefer , Async...
  fun exec(...):Kind<F, ...> {
      // 0.9.0, binding is deprecated...
    return binding {
        val a = method...().bind()
        val b = method...().bind()
        ...
    }
  }
}
0.9.0
Copy code
// I think that there are better way to write than ↓ .
object Sample<ForDeferredK>, MonadThrow<ForDeferredK> by DeferredK.async() {
    override fun monadError(): MonadThrow<ForDeferredK> {
        return DeferredK.async()
    } 
}

// is this correct way...?
interface Sample : MonadThrow<F>, Fx<F> {
  fun exec(...):Kind<F, ...> {
    return fx {
        val a = !method...()
        val b = !method...()
        ...
    }
  }
}
full sample code https://gist.github.com/daneko/ef38e95fec2ae97de20973a5d006dc0f so could you tell me your recommended code, and | or how to migration!