Created
November 11, 2018 11:26
-
-
Save ozcanzaferayan/6233cf1ed6fce6fb326a6a4657368cb8 to your computer and use it in GitHub Desktop.
Kotlin Nedir: Kotlin'de fonksiyon tipi oluşturma ve çağırma
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
fun main(args: Array<String>) { | |
// SAM kullanmadan inline bir şekilde fonksiyon tipi oluşturulabiliyor | |
val helloWorld = { x: String, y: String -> x + y } | |
print(helloWorld("Hello", " World")) // Çıktı: Hello World | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment