Last active
December 11, 2016 09:30
-
-
Save loganlinn/f23cb8ee1589c19487f2 to your computer and use it in GitHub Desktop.
Swift forEach
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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