Is there any equivalent technique of Array#product?
Can the same code be done in any other way?
[1,2,3].product([6,7])
#=> [[1, 6], [1, 7], [2, 6], [2, 7], [3, 6], [3, 7]]
Thanks in advance!
Is there any equivalent technique of Array#product?
Can the same code be done in any other way?
[1,2,3].product([6,7])
#=> [[1, 6], [1, 7], [2, 6], [2, 7], [3, 6], [3, 7]]
Thanks in advance!
Yes. Why?
Adam P. wrote in post #1103670:
Yes. Why?
Out of curiosity.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs