user=> (let [num (* 1234567890 21)] [num (int num) (long num)]) [25925925690 156121914 25925925690]
user=> (= 21 (long 21)) true ;; but user=> (.equals 21 (long 21)) false ;; and thus user=> (get {21 :twenty-one} (long 21)) nil
Coerce to int
Casts to long[]
Creates an array of longs
(defn long "Coerce to long" {:inline (fn [x] `(. clojure.lang.RT (longCast ~x))) :added "1.0"} [^Number x] (clojure.lang.RT/longCast x))
Comments top
No comments for long. Log in to add a comment.