Skip to content

Instantly share code, notes, and snippets.

@kadiralev1
Created September 10, 2018 11:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kadiralev1/66d21e8dd3c156fb98574e2198f96b29 to your computer and use it in GitHub Desktop.
Save kadiralev1/66d21e8dd3c156fb98574e2198f96b29 to your computer and use it in GitHub Desktop.
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