Public are the functions phrase
, phrase-first
and the macro defphraser
.
Public are the functions `phrase`, `phrase-first` and the macro `defphraser`.
(defphraser pred
specifiers?
[context-binding-form problem-binding-form & capture-binding-forms]
&
body)
Defines a phraser. Takes a predicate with possible capture symbols which have to be also defined in the argument vector.
Defines a phraser. Takes a predicate with possible capture symbols which have to be also defined in the argument vector.
(phrase context problem)
Takes a context and a clojure.spec problem and dispatches to a phraser.
Returns the phrasers return value or nil if none was found and no default phraser is defined. Dispatches based on pred and via of the problem. See phraser macro for details.
Takes a context and a clojure.spec problem and dispatches to a phraser. Returns the phrasers return value or nil if none was found and no default phraser is defined. Dispatches based on pred and via of the problem. See phraser macro for details.
(phrase* context problem)
Phrases the given problem for human consumption.
Dispatches on normalized pred and optional via of problem.
Dispatches in this order:
Phrases the given problem for human consumption. Dispatches on normalized pred and optional via of problem. Dispatches in this order: * [normalized-pred via] * [normalized-pred]
(phrase-first context spec x)
Given a spec and a value x, phrases the first problem using context if any.
Returns nil if x is valid or no phraser was found. See phrase for details. Use phrase directly if you want to phrase more than one problem.
Given a spec and a value x, phrases the first problem using context if any. Returns nil if x is valid or no phraser was found. See phrase for details. Use phrase directly if you want to phrase more than one problem.
(remove-default!)
Removes the default phraser.
Removes the default phraser.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close