Skip to content

Instantly share code, notes, and snippets.

@ZenCocoon
Created January 15, 2010 11:24
Show Gist options
  • Save ZenCocoon/277970 to your computer and use it in GitHub Desktop.
Save ZenCocoon/277970 to your computer and use it in GitHub Desktop.
The idea is to apply a method (in this case adding 1) for all elements from a array (here Integer), this should be done deeply.
Original: [1, 2, 3, ["a", 1, 2, 3, ["a", 1, 2, 3], "a"]
Desired: [2, 3, 4, ["a", 2, 3, 4, ["a", 2, 3, 4], "a"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment