Created
February 19, 2018 21:17
-
-
Save tswistak/ef093a9c5ffe55d08288bb6bc657062a 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
| /* | |
| * Snippets collected during development: made by myself or found on StackOverflow/GitHub. | |
| * Collection will grow in time. | |
| * Enjoy. | |
| */ | |
| // --- running each function in an array --- | |
| const tab = [(a) => console.log(a), | |
| (a) => console.log(a+a), | |
| (a) => console.log(a-a)]; | |
| _.forEach(tab, fn => fn.call(null, 1)); | |
| // or | |
| _.invokeMap(tab, _.call, null, 1); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment