Skip to content

Instantly share code, notes, and snippets.

@ahawkins
Created December 6, 2010 07:26
Show Gist options
  • Save ahawkins/729985 to your computer and use it in GitHub Desktop.
Save ahawkins/729985 to your computer and use it in GitHub Desktop.
given a hash like
{:property1 => [1,2,3,4,5], :property2 => [1,2,3,4,5]}
how to iterate through all the keys
and their values to create all possible combinations of each property
given an infinite number of keys where each key's value is an array of possible values
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment