(add-description descriptions rule result)
If dscr is a function apply it to result of pred function Otherwise return dscr
If dscr is a function apply it to result of pred function Otherwise return dscr
(context cfn)
Used in rules to access the context passed in to describe.
Used in rules to access the context passed in to describe.
(count-not-in-range arg)
(count-not-in-range arg m n)
(count-not-in-range arg m n dscr)
(does-not-match arg)
(does-not-match arg regex)
(does-not-match arg regex dscr)
(graph node-defs)
Allows slightly more compact syntax for defining graphs by treating a vector of [:a :b :c] as pairs [:a :b] [:b :c] and by treating rule maps as nodes instead of attempting to treat them as maps describing nodes and edges
Allows slightly more compact syntax for defining graphs by treating a vector of [:a :b :c] as pairs [:a :b] [:b :c] and by treating rule maps as nodes instead of attempting to treat them as maps describing nodes and edges
(key-rule key-fn rules)
Treats value returned by key-fn as new context that you're applying rules to
Treats value returned by key-fn as new context that you're applying rules to
(map-describe rules xs)
(map-describe rules additional-ctx xs)
Apply rules to xs; return nil if all descriptions nil
Apply rules to xs; return nil if all descriptions nil
(map-rollup-descriptions descriptions)
Converts set of descriptions to a map roughly reflecting the original map described. Descriptions take the form of:
#{[:a [::y]] [:a [::z]] [:b [::x]]}
This returns a map of the form:
{:a #{::y ::z} :b #{::x}}
A concession to people who insist that this is about validation and not describing.
Converts set of descriptions to a map roughly reflecting the original map described. Descriptions take the form of: #{[:a [::y]] [:a [::z]] [:b [::x]]} This returns a map of the form: {:a #{::y ::z} :b #{::x}} A concession to people who insist that this is about validation and not describing.
(remove-rule-subgraph rule-graph rule)
Remove all downstream rules so that we don't attempt to apply them
Remove all downstream rules so that we don't attempt to apply them
(resolve-args ctx args)
Rule args come in four flavors:
context
. This resolves by applying
the fn to the context.:const
keyword in metadata. This resolves to itself.Rule args come in four flavors: * A function wrapped with `context`. This resolves by applying the fn to the context. * A fn with the `:const` keyword in metadata. This resolves to itself. * A keyword or fn. This resolves by being applied to the subject (the thing being described). * Something else. This resolves to itself.
(rule-applies? ctx rule-graph rule)
Apply the predicate function to args.
Apply the predicate function to args.
(rules->graph rules)
Convert data structure describing graph to an actual graph.
Convert data structure describing graph to an actual graph.
(spec-explain-data arg)
(spec-explain-data arg spec)
(spec-explain-data arg spec dscr)
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close