Created
March 26, 2017 03:18
-
-
Save jackmott/f674aa4cdcea3fb889f6e12247e108c3 to your computer and use it in GitHub Desktop.
fast foreach
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
| public static void ForEach<T>(this T[] array, Action<T> lambda) | |
| { | |
| foreach (var x in array) | |
| { | |
| lambda.Invoke(x); | |
| } | |
| } | |
| //use like | |
| Effects.Split(':').ForEach(x => x.ActivateEffect(x)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment