Created
June 6, 2014 18:51
-
-
Save AlexJWayne/5d5c73a373b0c4839280 to your computer and use it in GitHub Desktop.
functionarray
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
| var fnArr: (()->())[] = [] | |
| fnArr.append({ println("a") }) | |
| fnArr.append({ println("b") }) | |
| fnArr.append({ println("c") }) | |
| for fn in fnArr { fn() } | |
| // a | |
| // b | |
| // c |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment