Created
September 10, 2018 11:26
-
-
Save kadiralev1/66d21e8dd3c156fb98574e2198f96b29 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
func cikarmaIslemi(sayi1:Int,sayi2:Int) -> Int { | |
return sayi1-sayi2 | |
} | |
cikarmaIslemi(sayi1:5 , sayi2:2) // sonuc 3 | |
// Şimdi aynı işi closure ile yapıyoruz | |
let closure : (Int , Int) -> Int = {(sayi1,sayi2) in | |
return sayi1-sayi2 | |
} | |
closure(5,2) // sonuc 3 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment