Created
February 5, 2016 15:45
-
-
Save vpetro/a1e5a749bffaef1e25b1 to your computer and use it in GitHub Desktop.
Scalaz imports
This file contains 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
scala> import scalaz.syntax.std.option._ | |
import scalaz.syntax.std.option._ | |
scala> val o: Option[Int] = Some(1) | |
o: Option[Int] = Some(1) | |
scala> o.cata(_ => 10, 20) | |
res0: Int = 10 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment