Created
January 3, 2014 15:20
-
-
Save longliveenduro/8239567 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
| object optionForCompr { | |
| val opt1 = Some(1) | |
| val opt2 = Some(2) | |
| val opt3 = Some(3) | |
| for { | |
| r1 <-opt1 | |
| r2 <-opt2 | |
| r3 <-opt3 | |
| } yield r1 + r2 + r3 | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment