Created
March 8, 2013 14:47
-
-
Save eduardo22i/5116902 to your computer and use it in GitHub Desktop.
Or2 Scala
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> def or2 (x:Boolean, y:Boolean) = (x, y) match { | |
| case (false, false) => false | |
| case (_, _) => true | |
| } | |
or2: (x: Boolean, y: Boolean)Boolean | |
scala> or2(true,false) | |
res18: Boolean = true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment