This namespace implements a data-driven substitution system. It's flexible
but much slower than the one defined in the pattern.r3.rewrite namespace that fully
precompiles the substitution.
This namespace implements a data-driven substitution system. It's flexible but much slower than the one defined in the [[pattern.r3.rewrite]] namespace that fully precompiles the substitution.
(substitute x)(substitute x dict)Substitute matchers in the given pattern with data in the provided dict.
If called with just a pattern (arity 1), returns a function that takes data and an optional failure continuation (fn [dict name pattern]) which must return a list of data to be spliced in place of the pattern.
If using a static pattern, prefer pattern.r3.rewrite/sub.
Substitute matchers in the given pattern with data in the provided dict. If called with just a pattern (arity 1), returns a function that takes data and an optional failure continuation (fn [dict name pattern]) which must return a *list* of data to be spliced in place of the pattern. If using a static pattern, prefer [[pattern.r3.rewrite/sub]].
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 |