• (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:4534 top

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

Comments top

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