Created
December 9, 2014 16:06
-
-
Save r-wheeler/66780e51a83a1f9ed486 to your computer and use it in GitHub Desktop.
Lifting a function to take option
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 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