Created
September 12, 2011 22:30
-
-
Save gkossakowski/1212663 to your computer and use it in GitHub Desktop.
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
scala> def zrobConfig(o1: Option[String], o2: Option[String], o3: Option[Int]): String = { | |
val optResult: Option[String] = for { x1 <- o1; x2 <- o2; x3 <- o3} yield x1 + x2 + x3 | |
optResult getOrElse "default config" | |
} | |
zrobConfig: (o1: Option[String], o2: Option[String], o3: Option[Int])String |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment