Skip to content

Instantly share code, notes, and snippets.

@ashfurrow
Created June 29, 2014 16:32
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ashfurrow/ead4276121cc8980fa2b to your computer and use it in GitHub Desktop.
Save ashfurrow/ead4276121cc8980fa2b to your computer and use it in GitHub Desktop.
// from https://twitter.com/ashfurrow/status/482488815266045952
func foo (closure: (Array<Int> -> ()) -> ()) {
closure({ (array: Array<Int>) -> () in
for i in array {
i
}
})
}
foo({ (closure: (Array<Int> -> ())) in
closure([1,2,3])
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment