pub fn apply_statefrm(
formula: StateFrm,
function: impl FnMut(&StateFrm) -> Result<Option<StateFrm>, MercError>,
) -> Result<StateFrm, MercError>Expand description
Applies the given function recursively to the state formula.
The substitution function takes a state formula and returns an optional new
formula. If it returns Some(new_formula), the substitution is applied and
the new formula is returned. If it returns None, the substitution is not
applied and the function continues to traverse the formula tree.