Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
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