Liking cljdoc? Tell your friends :D

sweet-array.core


aclonecljmacro

(aclone arr)

aclone*cljmacro

(aclone* arr)

agetcljmacro

(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.
raw docstring

aget*cljmacro

(aget* arr idx & more)

array-type?clj

(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.
raw docstring

array?clj

(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.
raw docstring

asetcljmacro

(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.
raw docstring

aset*cljmacro

(aset* arr idx & idxv)

castcljmacro

(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.
raw docstring

defcljmacro

(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.
raw docstring

def*cljmacro

(def* name sym docstr expr)

instance?cljmacro

(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.
raw docstring

into-arraycljmacro

(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.
raw docstring

newcljmacro

(new type-desc & args)

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.
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.
raw docstring

tagcljmacro

(tag desc)

tag-fnclj

(tag-fn type-desc)

typecljmacro

(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.
raw docstring

type-fnclj

(type-fn desc)

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close