We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi and thanks for this (and everything else you work on).
Coming back from Scala Days, I was experimenting a bit with this sort of things and came out with a silly instance for Future along these lines:
Future
delegate for Monad[Future] { def (fa: Future[A]) map[A, B](f: A => Future[B]): Future[B] = fa.map(f) }
My question is how would one go about passing the required ExecutionContext.
ExecutionContext
Thanks!
The text was updated successfully, but these errors were encountered:
Hi. I was wondering if anybody had time to help me with this. Otherwise I'll close it, no problem.
Sorry, something went wrong.
implicit val ec = scala.concurrent.ExecutionContext.global delegate for Monad[Future] { def (fa: Future[A]) map[A, B](f: A => Future[B]): Future[B] = fa.map(f) }
Future is a monad, I truly recommend trying to to avoid using at a Monad as how its typically used, side-effecting is not.
So this is only useful when used in a way future is never actually used as.
Otherwise I think future would need here as well to rely on scala 2 mechanisms at the implicit context is not available.
Thanks so much Christopher!
No branches or pull requests
Hi and thanks for this (and everything else you work on).
Coming back from Scala Days, I was experimenting a bit with this sort of things and came out with a silly instance for
Future
along these lines:My question is how would one go about passing the required
ExecutionContext
.Thanks!
The text was updated successfully, but these errors were encountered: