Skip to content

Instantly share code, notes, and snippets.

@vpetro
Created February 5, 2016 15:45
Show Gist options
  • Save vpetro/a1e5a749bffaef1e25b1 to your computer and use it in GitHub Desktop.
Save vpetro/a1e5a749bffaef1e25b1 to your computer and use it in GitHub Desktop.
Scalaz imports
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