Last active
November 4, 2020 02:13
-
-
Save rupeshtr78/313c51e50a418357c3cab8242c5300b3 to your computer and use it in GitHub Desktop.
function1 signature
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
val function1 = new Function1[Int, Int] { | |
def apply(x: Int) = x * 100 | |
} | |
val res = (x: Int) => x * 100 | |
assert(res(10) == function1(10)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment