pub fn substitute(var: &str, replacement: &TLExpr, body: TLExpr) -> TLExprExpand description
Substitute all free occurrences of var with replacement in body.
This is capture-avoiding: when a binder that re-introduces var is
encountered, substitution stops for the sub-tree guarded by that binder.
Variable occurrences are zero-argument predicates with name == var
and Term::Var(var) inside predicate arguments.