1.3.0 permalink Arrow_down_16x16

alength

clojure.core

  • (alength array)
Returns the length of the Java array. Works on arrays of all
types.

1 Example top

  • user=> (def my-array (into-array Integer/TYPE [1 2 3]))
    #'user/my-array
    
    user=> (alength my-array)
    3
Log in to add / edit an example.

See Also top

Log in to add a see also.

Plus_12x12 Minus_12x12 Source clojure/core.clj:3436 top

(defn alength
  "Returns the length of the Java array. Works on arrays of all
  types."
  {:inline (fn [a] `(. clojure.lang.RT (alength ~a)))
   :added "1.0"}
  [array] (. clojure.lang.RT (alength array)))
Vars in clojure.core/alength:
Used in 0 other vars

Comments top

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