Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rename sequence #6

Open
cvogt opened this issue Oct 22, 2015 · 1 comment
Open

rename sequence #6

cvogt opened this issue Oct 22, 2015 · 1 comment

Comments

@cvogt
Copy link
Owner

cvogt commented Oct 22, 2015

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
Copy link
Owner Author

cvogt commented Oct 25, 2015

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
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant