Skip to content

Instantly share code, notes, and snippets.

@hmhmsh
Created November 30, 2017 06:06
Show Gist options
  • Save hmhmsh/00b7415cc407ae637e62ba6aff6ee497 to your computer and use it in GitHub Desktop.
Save hmhmsh/00b7415cc407ae637e62ba6aff6ee497 to your computer and use it in GitHub Desktop.
func a() {
closure({ (a: Int, b: Int) -> Bool in
return a > b
})
closure() { (a, b) in
return a > b
}
closure() { (a, b) in
a > b
}
closure() {
$0 > $1
}
closure(>)
}
func closure(close:(Int, Int)->Bool) {
print("\(close(4, 2))")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment