Liking cljdoc? Tell your friends :D

pattern.matchers

This file contains the definitions of the nearly 20 built-in pattern matcher combinators.

Matchers are registered with a handler function and a matcher-type symbol or keyword together with some meta information about the matcher such as whether it produces a named binding, has any aliases, etc.

Each registered matcher is a function that compiles the raw pattern to a matcher combinator function. Each matcher combinator accepts data to be match, the current binding dictionary, and an environment that includes the success function which is called if the matcher successfully makes a match. If the matcher does not match it returns false.

Some matchers can backtrack and try different combinations of input data. They do that by making an initial match and calling the success continuation with the match and associated bindings. If the match is not successful, the matcher can try a different combination of input data and call the success continuation again. This can happen as many times as necessary and results in effective backtracking behavior.

Matcher combinators also have a set of metadata attached to them that describes the minimum match length, whether the match length is variable, captured variable names and any optional variable modes attached to the variable names. For recursive matchers such as list or sequence matchers, the metadata is a combination of the matcher's own metadata and that of its child matchers.

This file contains the definitions of the nearly 20 built-in pattern matcher
combinators.

Matchers are registered with a handler function and a matcher-type symbol or
keyword together with some meta information about the matcher such as whether
it produces a named binding, has any aliases, etc.

Each registered matcher is a function that compiles the raw pattern to a
matcher combinator function. Each matcher combinator accepts data to be match,
the current binding dictionary, and an environment that includes the success
function which is called if the matcher successfully makes a match. If the
matcher does not match it returns false.

Some matchers can backtrack and try different combinations of input data. They
do that by making an initial match and calling the success continuation with
the match and associated bindings. If the match is not successful, the matcher
can try a different combination of input data and call the success
continuation again. This can happen as many times as necessary and results in
effective backtracking behavior.

Matcher combinators also have a set of metadata attached to them that
describes the minimum match length, whether the match length is variable,
captured variable names and any optional variable modes attached to the
variable names. For recursive matchers such as list or sequence matchers, the
metadata is a combination of the matcher's own metadata and that of its child
matchers.
raw docstring

No vars found in this namespace.

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

× close