Open cvogt opened 9 years ago
More proposals:
implicit class FutureComprehension(f: Future.type){
def flat = sequence[Future]
// or
def comprehension = sequence[Future]
}
Future.flat{
~someFuture + ~otherFuture
}
//or
Future.comprehension{
~someFuture + ~otherFuture
}
the common Monad.sequence has well defined semantics among others not being sequential. The comprehension currently called
sequence
in here is sequential, so we should probably rename it. How aboutcomprehension
orfor2
orforseq
orflat
(flat like flatMap), e.g.