A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://clojure.github.io/core.contracts/index.html below:

Contracts programming in Clojure 0.0.7 API documentation

API for clojure.core.contracts -

Full namespace name:

clojure.core.contracts Overview
The public contracts programming functions and macros for clojure.core.contracts.

Public Variables and Functions
providemacro
Usage: (provide & kontracts)
Provides the Var manipulation macro offering ex post facto application of contracts
to existing functions.
Source

with-constraintsfunction
Usage: (with-constraints f)
       (with-constraints f c)
       (with-constraints f c & more)
A contract combinator.

 Takes a target function and a number of contracts and returns a function with the contracts
 applied to the original.  This is the preferred way to apply a contract previously created
 using `contract` as the use of `partial` may not work as implementation details change.
Source

clojure.core.contracts.constraints


Public Variables and Functions
<-function
Usage: (<- p q)
Converse implication
Source

<=>function
Usage: (<=> p q)
Logical equality
Source

=function
Usage: (= l#)
       (= l# r#)
Curried version of #'clojure.core/=
Source

==function
Usage: (== l#)
       (== l# r#)
Curried version of #'clojure.core/==
Source

defconstrainedfnmacro
Usage: (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.
Source

exceptfunction
Usage: (except p q)
P except Q
Source

impliesfunction
Usage: (implies p q)
Logical implication
Source

infunction
Usage: (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`.
Source

not=function
Usage: (not= l#)
       (not= l# r#)
Curried version of #'clojure.core/not=
Source

whitelistfunction
Usage: (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.
Source

xorfunction
Usage: (xor p q)
Exclusive or
Source

clojure.core.contracts.impl.transformers


Types
Hocrecord

Fields:

[field desc]

Protocols:

Interfaces:

clojure.lang.IHashEq, clojure.lang.IKeywordLookup, clojure.lang.ILookup, clojure.lang.IObj, clojure.lang.IPersistentMap, java.io.Serializable, java.util.Map
Public Variables and Functions
->Hocfunction
Usage: (->Hoc field desc)
Positional factory function for class clojure.core.contracts.impl.transformers.Hoc.
Source

map->Hocfunction
Usage: (map->Hoc m#)
Factory function for class clojure.core.contracts.impl.transformers.Hoc, taking a map of keywords to field values.
Source

clojure.core.contracts.impl.utils


Public Variables and Functions
constraint?function
Usage: (constraint? sym)
Determines if a symbol represents a
core.contracts constraint.
Source

defcurriedmacro
Usage: (defcurried name doc meta args & body)
Builds another arity of the fn that returns a fn awaiting the last
param
Source

defcurry-frommacro
Usage: (defcurry-from namespace & names)
Builds a pass-through curried fn for each name.
Source


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4