-
-
Save alfian0/d29a42ca1b5d04c86b884853656b5ab3 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