flow-comprehensions
flow-comprehensions copied to clipboard
rename sequence
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 about comprehension or for2or forseq or flat (flat like flatMap), e.g.
flat[Future]{
~someFuture + ~otherFuture
}
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
}