Skip to content

Instantly share code, notes, and snippets.

@NTCoding
Created January 23, 2016 16:07
Show Gist options
  • Select an option

  • Save NTCoding/af5d871e78e4b108087b to your computer and use it in GitHub Desktop.

Select an option

Save NTCoding/af5d871e78e4b108087b to your computer and use it in GitHub Desktop.
def retF[A,B](a: A)(b: B): A => Future[B] =
x => if (x == a) Future.successful(b) else throw ReturnFailed(s"$x did not equal $a")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment