Skip to content

Instantly share code, notes, and snippets.

@mistydemeo
Created January 27, 2013 05:04
Show Gist options
  • Save mistydemeo/fcd0dc4f31e04cb0019f to your computer and use it in GitHub Desktop.
Save mistydemeo/fcd0dc4f31e04cb0019f to your computer and use it in GitHub Desktop.
a = ["q", "u"]
b = ["x", "y"]
a.flat_map do |i|
b.flat_map {|j| [i+j, j+i]}
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment