Liking cljdoc? Tell your friends :D

clojure.core.contracts.constraints


<-clj

(<- p q)

Converse implication

Converse implication
sourceraw docstring

<=>clj

(<=> p q)

Logical equality

Logical equality
sourceraw docstring

=clj

(= l__2007__auto__)
(= l__2007__auto__ r__2008__auto__)

Curried version of #'clojure.core/=

Curried version of #'clojure.core/=
sourceraw docstring

==clj

(== l__2007__auto__)
(== l__2007__auto__ r__2008__auto__)

Curried version of #'clojure.core/==

Curried version of #'clojure.core/==
sourceraw docstring

all-negative?clj

source

all-numbers?clj

source

all-positive?clj

source

anythingclj

(anything & _)
source

defconstrainedfncljmacro

(defconstrainedfn name & body)

Defines a function using the contract vector appearing after the arguments.

(defconstrainedfn sqr
  [n] [number? (not= 0 n) => pos? number?]
  (* n n))

Like the contract macro, multiple arity functions can be defined where each argument vector is immediately followed by the relevent arity expectations. This macro will also detect if a map is in that constraints position and use that instead under the assumption that Clojure's :pre/:post map is used instead.

Defines a function using the `contract` vector appearing after the arguments.

    (defconstrainedfn sqr
      [n] [number? (not= 0 n) => pos? number?]
      (* n n))

Like the `contract` macro, multiple arity functions can be defined where each argument vector
is immediately followed by the relevent arity expectations.  This macro will also detect
if a map is in that constraints position and use that instead under the assumption that
Clojure's `:pre`/`:post` map is used instead.
sourceraw docstring

defconstrainedrecordcljmacro

(defconstrainedrecord name slots inv-description invariants & etc)
source

exceptclj

(except p q)

P except Q

P except Q
sourceraw docstring

falseyclj

source

impliesclj

(implies p q)

Logical implication

Logical implication
sourceraw docstring

inclj

(in e & args)

Takes an item and determines if it falls in the listed args. This can be used most effectively for numbers since any numbers in a vector represent a range of values determined by the same arguments as given to range.

Takes an item and determines if it falls in the listed args.  This can be
used most effectively for numbers since any numbers in a vector represent
a range of values determined by the same arguments as given to `range`.
sourceraw docstring

not=clj

(not= l__2007__auto__)
(not= l__2007__auto__ r__2008__auto__)

Curried version of #'clojure.core/not=

Curried version of #'clojure.core/not=
sourceraw docstring

truthyclj

source

whitelistclj

(whitelist wl things)

Takes a thing with keys (i.e. maps or sets) and checks if it contains only the keys listed in the given whitelist.

Takes a thing with keys (i.e. maps or sets) and checks if it contains only
the keys listed in the given whitelist.
sourceraw docstring

xorclj

(xor p q)

Exclusive or

Exclusive or
sourceraw docstring

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

× close