store/[org.clojure/clojure "1.8.0"] clj::clojure.core/long-array

Official Documentation

Add notes
Arities
==================================================
   [size-or-seq]
   [size init-val-or-seq]

Docstring
==================================================
  Creates an array of longs

Source

(defn long-array
  "Creates an array of longs"
  {:inline (fn [& args] `(. clojure.lang.Numbers long_array ~@args))
   :inline-arities #{1 2}
   :added "1.0"}
  ([size-or-seq] (. clojure.lang.Numbers long_array size-or-seq))
  ([size init-val-or-seq] (. clojure.lang.Numbers long_array size init-val-or-seq)))

Example 1

Edit
;; create a long array using long-array and show it can be used
;; with the standard Java Arrays functions binarySearch and fill
;; note the needed coercions

(def is (long-array (range 3 20)))
;; => #'user/is

(vec is)
;; => [3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19]

(java.util.Arrays/binarySearch is (long 10))
;; => 7

(java.util.Arrays/fill is 3 8 (long 99))
;; => nil

(vec is)
;; => [3 4 5 99 99 99 99 99 11 12 13 14 15 16 17 18 19]

Uses on crossclj