javascript - Cross product in underscore.js? -


is there function built-in underscore give "cross product" of 2 arrays?

i have implemented cross-product this, nice if there built-in function --

domain = []; _.each(x, function(x1) {     _.each(y, function(y1) {         domain.push([x1,y1]);     }); }); 

you can use _.mixin extend underscore own function.


Comments

Popular posts from this blog

sql - VB.NET Operand type clash: date is incompatible with int error -

SVG stroke-linecap doesn't work for circles in Firefox? -

python - TypeError: Scalar value for argument 'color' is not numeric in openCV -