(agent? obj)
Returns true
if x
is of type clojure.lang.Agent
.
(agent? (agent nil)) => true
Returns `true` if `x` is of type `clojure.lang.Agent`. (agent? (agent nil)) => true
(atom? obj)
Returns true
if x
is of type clojure.lang.Atom
.
(atom? (atom nil)) => true
Returns `true` if `x` is of type `clojure.lang.Atom`. (atom? (atom nil)) => true
(bigdec? x)
Returns true
if x
is of type java.math.BigDecimal
.
(bigdec? 1M) => true (bigdec? 1.0) => false
Returns `true` if `x` is of type `java.math.BigDecimal`. (bigdec? 1M) => true (bigdec? 1.0) => false
(bigint? x)
Returns true
if x
is of type clojure.lang.BigInt
.
(bigint? 1N) => true (bigint? 1) => false
Returns `true` if `x` is of type `clojure.lang.BigInt`. (bigint? 1N) => true (bigint? 1) => false
(boolean? x)
Returns true
if x
is of type java.lang.Boolean
.
(boolean? true) => true (boolean? false) => true (boolean? 1) => false
Returns `true` if `x` is of type `java.lang.Boolean`. (boolean? true) => true (boolean? false) => true (boolean? 1) => false
(byte? x)
Returns true
if x
is of type java.lang.Byte
(byte? (byte 1)) => true
Returns `true` if `x` is of type `java.lang.Byte` (byte? (byte 1)) => true
(bytes? x)
Returns true
if x
is a primitive byte
array.
(bytes? (byte-array 8)) => true
Returns `true` if `x` is a primitive `byte` array. (bytes? (byte-array 8)) => true
(comparable? x y)
Returns true
if x
and y
both implements java.lang.Comparable
.
(comparable? 1 1) => true
Returns `true` if `x` and `y` both implements `java.lang.Comparable`. (comparable? 1 1) => true
(double? x)
Returns true
if x
is of type java.lang.Double
.
(double? 1) => false (double? (double 1)) => true
Returns `true` if `x` is of type `java.lang.Double`. (double? 1) => false (double? (double 1)) => true
(edn? x)
checks if an entry is valid edn
(edn? 1) => true
(edn? {}) => true
(edn? (java.util.Date.)) => false
checks if an entry is valid edn (edn? 1) => true (edn? {}) => true (edn? (java.util.Date.)) => false
(hash-map? x)
Returns true
if x
implements clojure.lang.APersistentMap
.
(hash-map? {}) => true (hash-map? []) => false
Returns `true` if `x` implements `clojure.lang.APersistentMap`. (hash-map? {}) => true (hash-map? []) => false
(ideref? obj)
Returns true
if x
is of type java.lang.IDeref
.
(ideref? (atom 0)) => true (ideref? (promise)) => true (ideref? (future)) => true
Returns `true` if `x` is of type `java.lang.IDeref`. (ideref? (atom 0)) => true (ideref? (promise)) => true (ideref? (future)) => true
(instant? x)
Returns true
if x
is of type java.util.Date
.
(instant? (java.util.Date.)) => true
Returns `true` if `x` is of type `java.util.Date`. (instant? (java.util.Date.)) => true
(iobj? x)
checks if a component is instance of clojure.lang.IObj
(iobj? 1) => false
(iobj? {}) => true
checks if a component is instance of clojure.lang.IObj (iobj? 1) => false (iobj? {}) => true
(iref? obj)
Returns true
if x
is of type clojure.lang.IRef
.
(iref? (atom 0)) => true (iref? (ref 0)) => true (iref? (agent 0)) => true (iref? (promise)) => false (iref? (future)) => false
Returns `true` if `x` is of type `clojure.lang.IRef`. (iref? (atom 0)) => true (iref? (ref 0)) => true (iref? (agent 0)) => true (iref? (promise)) => false (iref? (future)) => false
(lazy-seq? x)
Returns true
if x
implements clojure.lang.LazySeq
.
(lazy-seq? (map inc [1 2 3])) => true (lazy-seq? ()) => false
Returns `true` if `x` implements `clojure.lang.LazySeq`. (lazy-seq? (map inc [1 2 3])) => true (lazy-seq? ()) => false
(long? x)
Returns true
if x
is of type java.lang.Long
.
(long? 1) => true (long? 1N) => false
Returns `true` if `x` is of type `java.lang.Long`. (long? 1) => true (long? 1N) => false
(promise? obj)
Returns true
is x
is a promise
(promise? (promise)) => true (promise? (future)) => false
Returns `true` is `x` is a promise (promise? (promise)) => true (promise? (future)) => false
(ref? obj)
Returns true
if x
is of type clojure.lang.Ref
.
(ref? (ref nil)) => true
Returns `true` if `x` is of type `clojure.lang.Ref`. (ref? (ref nil)) => true
(regexp? x)
Returns true
if x
implements clojure.lang.IPersistentMap
.
(regexp? #"\d+") => true
Returns `true` if `x` implements `clojure.lang.IPersistentMap`. (regexp? #"\d+") => true
(short? x)
Returns true
if x
is of type java.lang.Short
(short? (short 1)) => true
Returns `true` if `x` is of type `java.lang.Short` (short? (short 1)) => true
(thread? obj)
Returns true
is x
is a thread
(thread? (Thread/currentThread)) => true
Returns `true` is `x` is a thread (thread? (Thread/currentThread)) => true
(type-checker k)
Returns the checking function associated with k
(type-checker :string) => #'clojure.core/string?
(require '[hara.core.base.check :refer [bytes?]]) (type-checker :bytes) => #'hara.core.base.check/bytes?
Returns the checking function associated with `k` (type-checker :string) => #'clojure.core/string? (require '[hara.core.base.check :refer [bytes?]]) (type-checker :bytes) => #'hara.core.base.check/bytes?
(uri? x)
Returns true
if x
is of type java.net.URI
.
(uri? (java.net.URI. "http://www.google.com")) => true
Returns `true` if `x` is of type `java.net.URI`. (uri? (java.net.URI. "http://www.google.com")) => true
(url? x)
Returns true
if x
is of type java.net.URL
.
(url? (java.net.URL. "file:/Users/chris/Development")) => true
Returns `true` if `x` is of type `java.net.URL`. (url? (java.net.URL. "file:/Users/chris/Development")) => true
(uuid? x)
Returns true
if x
is of type java.util.UUID
.
(uuid? (java.util.UUID/randomUUID)) => true
Returns `true` if `x` is of type `java.util.UUID`. (uuid? (java.util.UUID/randomUUID)) => true
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close