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

android - Why am I getting the message 'Youractivity.java is not an activity subclass or alias' -

python - How do I create a list index that loops through integers in another list -

c# - “System.Security.Cryptography.CryptographicException: Keyset does not exist” when reading private key from remote machine -