Created
March 5, 2012 23:09
-
-
Save jbrechtel/1981875 to your computer and use it in GitHub Desktop.
foo
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def foo(nums) | |
h = Hash.new([]) | |
nums.each { |n| h[n] << n } | |
puts nums.inspect | |
puts nums['foo'] | |
end | |
#YETANOTHERREASONMUTABLESTATEISTERRIBLE |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment