Created
April 27, 2022 08:13
-
-
Save lukewar/7b17dfd44bae16815a326cbf319c12c6 to your computer and use it in GitHub Desktop.
Ruby Hash.new with default value
This file contains 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
Hash.new { |h, k| h[k] = [] } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment