flow-comprehensions icon indicating copy to clipboard operation
flow-comprehensions copied to clipboard

rename sequence

Open cvogt opened this issue 10 years ago • 1 comments

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
}

cvogt avatar Oct 22 '15 21:10 cvogt

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
}

cvogt avatar Oct 25 '15 15:10 cvogt