Last active
July 18, 2020 18:11
-
-
Save egeysn/d756842b8892651242f67d22b62e3d4f to your computer and use it in GitHub Desktop.
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 sum(a : Int, b : Int) : Int { | |
return a + b | |
} | |
fun higherOrderSumFunction( name : String, | |
numberOne : Int, | |
numberTwo : Int, | |
result : (Int, Int) -> Int) { | |
println("$name ---> $numberOne + $numberTwo = ${result(numberOne,numberTwo)}") | |
} | |
fun main(){ | |
// sum fonksiyonunun başına :: koyarak bir diğer fonksiyonumuza gönderdik | |
higherOrderSumFunction("Sum",5,9, ::sum) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment