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")
    user=> (.hashCode "a")  ; notice it is the same hash as java.lang.String.hashCode()
    user=> (hash [1 2 3])
    user=> (hash [1 2 3 4])
Log in to add / edit an example.

See Also top

  • 0

    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.