(aclone arr)
(aclone* arr)
(aget arr idx & more)
Works just like clojure.core/aget, but with static checking of the array type to detect type errors at compile time.
Works just like clojure.core/aget, but with static checking of the array type to detect type errors at compile time.
(aget* arr idx & more)
(array-type? t)
Returns true if and only if the given type is an array type.
Returns true if and only if the given type is an array type.
(array? x)
Returns true if and only if the given object is an array.
Returns true if and only if the given object is an array.
(aset arr idx & idxv)
Works just like clojure.core/aset, but with static checking of the array type to detect type errors at compile time.
Works just like clojure.core/aset, but with static checking of the array type to detect type errors at compile time.
(aset* arr idx & idxv)
(cast type-desc expr)
Casts the given expression expr to the array type denoted by type-desc.
This macro only has the compile-time effect and does nothing at runtime.
Casts the given expression expr to the array type denoted by type-desc. This macro only has the compile-time effect and does nothing at runtime.
(def name arr)
(def name docstr arr)
The macro version of def dedicated to arrays. This macro can be used as a drop-in replacement for Clojure's def. Unlike the ordinary def form, (sweet-array.core/def <var> <init>) infers the static type of <init> and implicitly adds the inferred type as the type hint for <var>. Throws an error at macro expansion time if the type of <init> cannot be statically inferred or if the inferred type is not an array type.
The macro version of def dedicated to arrays. This macro can be used as a drop-in replacement for Clojure's def. Unlike the ordinary def form, (sweet-array.core/def <var> <init>) infers the static type of <init> and implicitly adds the inferred type as the type hint for <var>. Throws an error at macro expansion time if the type of <init> cannot be statically inferred or if the inferred type is not an array type.
(def* name sym docstr expr)
(instance? type-desc x)
Evaluates x and tests if it is an instance of the array type denoted by type-desc.
Evaluates x and tests if it is an instance of the array type denoted by type-desc.
(into-array type-desc coll)
(into-array type-desc xform coll)
Converts the given collection (seqable) to an array of the type denoted by type-desc. A transducer may be supplied.
Converts the given collection (seqable) to an array of the type denoted by type-desc. A transducer may be supplied.
(new type-desc & args)
Creates an array of the type denoted by type-desc.
The macro has two forms:
Creates an array of the type denoted by type-desc. The macro has two forms: - (new [T] n): produce an array of type T of size n - (new [T] [e_1 ... e_n]): produce an array of type T of size n initialized with elements e_1, ..., e_n.
(tag desc)
(tag-fn type-desc)
(type desc)
Returns the class object that represents the array type denoted by type-desc.
Returns the class object that represents the array type denoted by type-desc.
(type-fn desc)
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close