You're viewing version 1.2.0 of alength. The latest stable version of Clojure Core is 1.3.0.
1.2.0 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:2973 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: defn
Used in 3 other vars amap areduce arr-impl

Comments top

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