Skip to content

Instantly share code, notes, and snippets.

Created October 1, 2010 08:59
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 anonymous/605953 to your computer and use it in GitHub Desktop.
Save anonymous/605953 to your computer and use it in GitHub Desktop.
1:177 user=> (hash 15)
15
1:178 user=> (hash (long 15))
15
1:179 user=> (hash (int 15))
15
1:180 user=> (let [k 15 m {15 :found} k1 (first (keys m))] [(class k) (class k1) (= k k1) (get m k)])
[java.lang.Integer java.lang.Integer true :found]
1:181 user=>
1:182 user=> (let [k (long 15) m {15 :found} k1 (first (keys m))] [(class k) (class k1) (= k k1) (get m k)])
[java.lang.Long java.lang.Integer true nil]
1:183 user=> (let [k 15 m {(long 15) :found} k1 (first (keys m))] [(class k) (class k1) (= k k1) (get m k)])
[java.lang.Integer java.lang.Long true nil]
1:184 user=>
1:185 user=> (let [k (long 15) m {(long 15) :found} k1 (first (keys m))] [(class k) (class k1) (= k k1) (get m k)])
[java.lang.Long java.lang.Long true :found]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment