Created
January 22, 2013 17:22
-
-
Save voleinikov/4596433 to your computer and use it in GitHub Desktop.
Example of Array#Product
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
[:a, :b].product([1,2]) # >>> [[:a, 1], [:a, 2], [:b, 1], [:b, 2]] | |
[:a, :b].product(1,2,3]) # >> [[:a, 1], [:a, 2], [:a, 3], [:b, 1], [:b, 2], [:b, 3]] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment