Skip to content

Instantly share code, notes, and snippets.

@r-wheeler
Created December 9, 2014 16:06
Show Gist options
  • Save r-wheeler/66780e51a83a1f9ed486 to your computer and use it in GitHub Desktop.
Save r-wheeler/66780e51a83a1f9ed486 to your computer and use it in GitHub Desktop.
Lifting a function to take option
def lift[A,B](f: A =>B): Option[A] => Option[B] = _ map f
lift(math.abs)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment