Skip to content

Instantly share code, notes, and snippets.

@bradparker
Created September 9, 2015 01:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bradparker/e1ba36efcf90d204bf1b to your computer and use it in GitHub Desktop.
Save bradparker/e1ba36efcf90d204bf1b to your computer and use it in GitHub Desktop.
Well this is, unsurprisingly, fine
(1..10e6).map {
SecureRandom.uuid
}.reduce(Hash.new(0)) { |counts, uuid|
counts[uuid] += 1
counts
}.values.uniq
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment