Last active
January 13, 2016 05:23
-
-
Save vmarquez/397c8462914e9e790ffa to your computer and use it in GitHub Desktop.
SeparateTasks.scala
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def taskSeparation[F[_], A](fa: List[F[A]])(implicit M: Catchable[F], N: Nondeterminism[F]): F[(List[Throwable], List[A])] = | |
N.gatherUnordered(fa.map(f => M.attempt(f))).map(_.separate) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment