unicode_fol_kit.apply_subst

unicode_fol_kit.apply_subst(node, subst)[source]

Apply substitution subst to node, returning a new node.

Recurses into Function/Atom arguments. A Variable is replaced by its bound term when its name is a key of subst (the replacement is itself substituted into, so chained bindings resolve fully); otherwise it is returned unchanged. Constants and Numbers are returned unchanged. The input node is never mutated.

Parameters:
Return type:

Node