Created
June 3, 2014 19:34
-
-
Save jarsen/4a4674b8b7ac1781a988 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 each (block : (T) -> ()) { | |
for item in self { | |
block(item) | |
} | |
} | |
} | |
animals.each(println) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment