Array comprehension in javascript.
Declaratively construct arrays.
Where 'arrays...' is any number of arrays to pull data from.
Both 'guard_function' and 'function' take the elements of each of the arrays as parameters.
The boolean returned from the 'guard_function' determines whether or not to use the data for those elements. 'guard_function' is optional.
The return value of 'function' produces each element in the resulting array.
# npm install -g array-comprehension var comprehend = ; ;> 5 4 3 2 6 5 4 3 7 6 5 4 8 7 6 5 9 8 7 6 10 9 8 7 ;> 2 4 6 8 10 12 14 16 18 20 ;> 12 14 16 18 20 var { return x; };;> 52 59 66 73 80 87 94 ;> "BOOM!" "BOOM!" "BOOM!" "BOOM!" "BOOM!" "BANG!" "BANG!" "BANG!" "BANG!" "BANG!" "BANG!" ;> 16 20 22 40 50 55 80 100 110 ;> 16 32 48 20 40 60 22 44 66 40 80 120 50 100 150 55 110 165 80 160 240 100 200 300 110 220 330 var nouns = 'hobo' 'frog' 'pope';var adjs = 'lazy' 'grouchy' 'scheming';;> "lazy hobo" "lazy frog" "lazy pope" "grouchy hobo" "grouchy frog" "grouchy pope" "scheming hobo" "scheming frog" "scheming pope"