Liking cljdoc? Tell your friends :D

pattern.rule


rulecljmacro

(rule pattern predicate? consequence)

Rule takes a match pattern and substitution pattern, compiles each of these and returns a function which may be applied to a form and (optionally) a success continuation. The function will try to match the pattern and, if successful, and the bindings satisfy the supplied predicate, will call the continuation with the result of the substitution.

Rule takes a match pattern and substitution pattern, compiles each
of these and returns a function which may be applied to a form
and (optionally) a success continuation. The function will try to
match the pattern and, if successful, _and_ the bindings satisfy the
supplied predicate, will call the continuation with the result of
the substitution.
sourceraw docstring

rule-simplifierclj

(rule-simplifier & rulesets)

Transform the supplied rulesets into a function of expressions which will arrange to apply each of the rules in the ruleset to all the component parts of the expression in depth order, then simplifies the result; the process is continued until a fixed point of the simplification process is achieved.

Transform the supplied rulesets into a function of expressions
which will arrange to apply each of the rules in the ruleset to all
the component parts of the expression in depth order, then
simplifies the result; the process is continued until a fixed point
of the simplification process is achieved.
sourceraw docstring

rulesetcljmacro

(ruleset & patterns-and-consequences)

Ruleset compiles rules, predicates and consequences (triplet-wise) into a function which acts like a single rule (as rule would produce) which acts by returning the consequence of the first successful rule, whose pattern-matches satisfy the predicate, or nil if none are applicable.

Ruleset compiles rules, predicates and consequences (triplet-wise)
into a function which acts like a single rule (as rule would
produce) which acts by returning the consequence of the first
successful rule, whose pattern-matches satisfy the predicate,
or nil if none are applicable.
sourceraw docstring

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

× close