Last active
December 23, 2015 06:09
-
-
Save mzimecki/6592195 to your computer and use it in GitHub Desktop.
[Scala] Functions and(x,y) and or(x,y)
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
def and(x: Boolean, y: =>Boolean) = if (x) y else false | |
def or(x: Boolean, y: =>Boolean) = if (x) true else y |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment