You're viewing version 1.2.0 of hash. The latest stable version of Clojure Core is 1.3.0.
1.2.0 Arrow_down_16x16
  • (hash x)
Returns the hash code of its argument

1 Example top

  • user=> (hash "a")
    97
    user=> (.hashCode "a")  ; notice it is the same hash as java.lang.String.hashCode()
    97
    user=> (hash [1 2 3])
    30817
    user=> (hash [1 2 3 4])
    955331
Log in to add / edit an example.

See Also top

  • 0
    clojure.core/get

    Returns the value mapped to key, not-found or nil if key not present.

Log in to add a see also.

Plus_12x12 Minus_12x12 Source clojure/core.clj:4079 top

(defn hash
  "Returns the hash code of its argument"
  {:added "1.0"}
  [x] (. clojure.lang.Util (hash x)))
Vars in clojure.core/hash: defn
Used in 1 other vars map-values

Comments top

No comments for hash. Log in to add a comment.