(defcase sym dispatch sketch & more)adds an additional case to the multispec
adds an additional case to the multispec
(defcontract sym & body)defines a contract
(type/defspec <int> integer?)
(defcontract -add- :inputs [<int> <int>])
(-add- 0.5 0.5) => (throws)
defines a contract (type/defspec <int> integer?) (defcontract -add- :inputs [<int> <int>]) (-add- 0.5 0.5) => (throws)
(defmultispec sym dispatch & pairs)macro for defining a multispec
macro for defining a multispec
(defspec sym sketch & more)macro for defining a spec
macro for defining a spec
(lax schema)(lax schema ks)relaxes a map (optional keys and maybe vals)
relaxes a map (optional keys and maybe vals)
(norm schema)(norm schema ks)gets rid of optional keys
gets rid of optional keys
(schema ?schema)(schema ?schema options)Creates a Schema object from any of the following:
Creates a Schema object from any of the following:
- Schema instance (just returns it)
- IntoSchema instance
- Schema vector syntax, e.g. [:string {:min 1}]
- Qualified Keyword or String, using a registry lookup(schema? x)Checks if x is a Schema instance
Checks if x is a Schema instance
(spec? x)checks that object is of type spec
checks that object is of type spec
(tighten schema)(tighten schema ks)tightens a map (no optionals or maybes)
tightens a map (no optionals or maybes)
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |