Skip to content

Instantly share code, notes, and snippets.

@numinit
Created October 9, 2012 23:13
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 numinit/3862072 to your computer and use it in GitHub Desktop.
Save numinit/3862072 to your computer and use it in GitHub Desktop.
a = ->(s, t) {s.length == t.length && (u = ->(v){v.bytes.reduce(1){|w, x| w * [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103][(x & 0x1f) - 1]}}).call(s) == u.call(t)}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment