Created
January 23, 2017 07:37
-
-
Save dgadiraju/9294d7ccfefa60fae2c4bcd96219af2b 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
//Creating functions | |
def addIntegers(i: Int, j: Int): Int = { | |
i + j | |
} | |
//Anonymous function assigned to a variable | |
val addIntegers = (i: Int, j: Int) => { | |
i + j | |
} | |
//Invocation | |
addIntegers(1, 2) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment