stojan
06/01/2019, 4:45 PMoverride fun transfer(
from: String,
to: String,
amount: Amount
): Kleisli<F, AccountRepository<F>, Pair<Account, Account>> =
ReaderT.monad<F, AccountRepository<F>>(this).binding {
val a = debit(from, amount).bind()
val b = credit(to, amount).bind()
Pair(a, b)
}.fix()
🙈