Skip to content

Instantly share code, notes, and snippets.

@bryanl
Created March 7, 2014 20:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bryanl/9419874 to your computer and use it in GitHub Desktop.
Save bryanl/9419874 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
a = [ [1,2,3], [2,3,4], [4,5,6] ]
b = []
a[0].each do |i|
a[1].each do |j|
a[2].each do |k|
b << [i,j,k]
end
end
end
puts b.inspect
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment