Created
November 5, 2013 12:05
-
-
Save kopos/7318098 to your computer and use it in GitHub Desktop.
scala tests
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
// Use as sum(4, 5) | |
// Use as sum(sum(4, 5), sum(1, 2)) | |
def sum(x: Int, y: Int): Int = { | |
x + y; | |
} | |
// Use as sum(4, 5) | |
// Use as sum(sum(4, 5), sum(1, 2)) | |
def sum = (x: Int, y: Int) => { x + y; } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@todo: Need to look at method, function and procedure