oryx.experimental.matching.rules.make_rule

Constructs a rewrite rule from a pattern and handler function.

pattern Any object registered as a matcher.
handler A function that takes in bindings as keyword arguments and returns an expression.

A 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.