Closed larsrh closed 11 years ago
also monad transformers for included monads for Try and Future would be very nice. might give it a go if I can find some time
EDIT upon trying to implement FutureT I realized it is impossible without blocking. consider this piece of code
def generate(n: Int): FutureT[List,Int] = FutureT(List.fill(n)(Future(n)))
val list: FutureT[List, Int] = ...
list flatMap generate
I repeats each number it's-value times. In order to return from the flatMap you need to know the number of elements. Therefore flatMap must be blocking so it's better not to include FutureT at all
Good idea. If you could do it, that would be terrific!
See https://github.com/scalaz/scalaz/pull/213.