Skip to content

Instantly share code, notes, and snippets.

@lightningdb
Created June 2, 2010 05:23
Show Gist options
  • Save lightningdb/421965 to your computer and use it in GitHub Desktop.
Save lightningdb/421965 to your computer and use it in GitHub Desktop.
many_elements.each do |foo|
dict[foo] ||= expensive_computation
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment