Skip to main content

Predicates

72
  • NaN?

    Returns true if num is NaN, else false

  • any?

    Returns true given any argument.

  • associative?

    Returns true if coll implements Associative

  • bases

    Returns the immediate superclass and direct interfaces of c, if any

  • boolean?

    Return true if x is a Boolean

  • bound?

    Returns true if all of the vars provided as arguments have any bound value, root or thread-local. Implies that deref'...

  • bytes?

    Return true if x is a byte array

  • char?

    Return true if x is a Character

  • class

    Returns the Class of x

  • class?

    Returns true if x is an instance of Class

  • counted?

    Returns true if coll implements count in constant time

  • decimal?

    Returns true if n is a BigDecimal

  • double?

    Return true if x is a Double

  • even?

    Returns true if n is even, throws an exception if n is not an integer

  • extends?

    Returns true if atype extends protocol

  • false?

    Returns true if x is the value false, false otherwise.

  • float?

    Returns true if n is a floating point number

  • fn?

    Returns true if x implements Fn, i.e. is an object created via fn.

  • ident?

    Return true if x is a symbol or keyword

  • identical?

    Tests if 2 arguments are the same object

  • ifn?

    Returns true if x implements IFn. Note that many data structures (e.g. sets and maps) implement IFn

  • indexed?

    Return true if coll implements Indexed, indicating efficient lookup by index

  • infinite?

    Returns true if num is negative or positive infinity, else false

  • inst?

    Return true if x satisfies Inst

  • instance?

    Evaluates x and tests if it is an instance of the class c. Returns true or false

  • int?

    Return true if x is a fixed precision integer

  • integer?

    Returns true if n is an integer

  • isa?

    Returns true if (= child parent), or child is directly or indirectly derived from parent, either via a Java type inher...

  • keyword?

    Return true if x is a Keyword

  • list?

    Returns true if x implements IPersistentList

  • map-entry?

    Return true if x is a map entry

  • map?

    Return true if x implements IPersistentMap

  • nat-int?

    Return true if x is a non-negative fixed precision integer

  • neg-int?

    Return true if x is a negative fixed precision integer

  • neg?

    Returns true if num is less than zero, else false

  • nil?

    Returns true if x is nil, false otherwise.

  • number?

    Returns true if x is a Number

  • odd?

    Returns true if n is odd, throws an exception if n is not an integer

  • pos-int?

    Return true if x is a positive fixed precision integer

  • pos?

    Returns true if num is greater than zero, else false

  • qualified-ident?

    Return true if x is a symbol or keyword with a namespace

  • qualified-keyword?

    Return true if x is a keyword with a namespace

  • qualified-symbol?

    Return true if x is a symbol with a namespace

  • ratio?

    Returns true if n is a Ratio

  • rational?

    Returns true if n is a rational number

  • realized?

    Returns true if a value has been produced for a promise, delay, future or lazy sequence.

  • record?

    Returns true if x is a record

  • reversible?

    Returns true if coll implements Reversible

  • satisfies?

    Returns true if x satisfies the protocol

  • seq?

    Return true if x implements ISeq

  • seqable?

    Return true if the seq function is supported for x

  • sequential?

    Returns true if coll implements Sequential

  • set?

    Returns true if x implements IPersistentSet

  • simple-ident?

    Return true if x is a symbol or keyword without a namespace

  • simple-keyword?

    Return true if x is a keyword without a namespace

  • simple-symbol?

    Return true if x is a symbol without a namespace

  • some?

    Returns true if x is not nil, false otherwise.

  • sorted?

    Returns true if coll implements Sorted

  • special-symbol?

    Returns true if s names a special form

  • string?

    Return true if x is a String

  • supers

    Returns the immediate and indirect superclasses and interfaces of c, if any

  • symbol?

    Return true if x is a Symbol

  • thread-bound?

    Returns true if all of the vars provided as arguments have thread-local bindings. Implies that set!'ing the provided ...

  • true?

    Returns true if x is the value true, false otherwise.

  • type

    Returns the :type metadata of x, or its Class if none

  • uri?

    Return true if x is a java.net.URI

  • uuid?

    Return true if x is a java.util.UUID

  • var?

    Returns true if v is of type clojure.lang.Var

  • vector?

    Return true if x implements IPersistentVector

  • volatile?

    Returns true if x is a volatile.

  • zero?

    Returns true if num is zero, else false