Skip to content

Instantly share code, notes, and snippets.

@dscataglini
Created August 26, 2013 19:55
Show Gist options
  • Select an option

  • Save dscataglini/6345896 to your computer and use it in GitHub Desktop.

Select an option

Save dscataglini/6345896 to your computer and use it in GitHub Desktop.
Hash Traversal
# Given the following hash
h = {a: 1, b1: {b2: {b3: nil}, c2: nil}, c1: {c2: {c3: nil}}}
# Write a function that prints out all the keys
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment