Skip to content

Instantly share code, notes, and snippets.

@AlexJWayne
Created June 6, 2014 18:51
Show Gist options
  • Select an option

  • Save AlexJWayne/5d5c73a373b0c4839280 to your computer and use it in GitHub Desktop.

Select an option

Save AlexJWayne/5d5c73a373b0c4839280 to your computer and use it in GitHub Desktop.
functionarray
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