|View source on GitHub
Constructs a rewrite rule from a pattern and handler function.
pattern: Any, handler
) -> Rule
|Any object registered as a matcher.
|A function that takes in bindings as keyword arguments and returns an expression.
rule function that rewrites an expression if it matches
pattern to the
expression returned by
handler with the matched bindings. If there is
no match, it returns the expression unchanged.