Skip to content

Instantly share code, notes, and snippets.

@LukaJCB
Last active September 5, 2017 13:48
Show Gist options
  • Save LukaJCB/1c70a81a2e82fc44ffe857bcb9eef8cd to your computer and use it in GitHub Desktop.
Save LukaJCB/1c70a81a2e82fc44ffe857bcb9eef8cd to your computer and use it in GitHub Desktop.
type Stack[E, A] = EitherT[Future, NonEmptyList[E], A]
def longRunningComputation(person: Person): Future[Either[NonEmptyList[Error], Result]] = ???
val people: List[Person] = ???
val result: Stack[Error], List[Result]] =
people.parTraverse(longRunningComputation _ andThen EitherT.apply)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment