Skip to content

Instantly share code, notes, and snippets.

@loganlinn
Last active December 11, 2016 09:30
Show Gist options
  • Save loganlinn/f23cb8ee1589c19487f2 to your computer and use it in GitHub Desktop.
Save loganlinn/f23cb8ee1589c19487f2 to your computer and use it in GitHub Desktop.
Swift forEach
extension Array {
func forEach(f: (element: T) -> Void) {
for e in self {
f(element: e)
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment