Skip to main content

zeta_or_share_in_place

Function zeta_or_share_in_place 

Source
pub fn zeta_or_share_in_place(
    term: &mut Term,
    step_in_place: &dyn Fn(&mut Term) -> bool,
    step: &dyn Fn(&Term) -> Option<Term>,
) -> bool
Expand description

zeta_or_share_opt on a Let the caller owns, stepping its parts where they lie: the same rule, in the same order, with the same answer, but a part that a step leaves alone is never copied and nothing is rebuilt around the one that moved. step_in_place must be the in-place twin of step (reduce_step_in_place of reduce_step_opt), which reduction::owned_normalize_controls pins shape by shape. false for anything not Let.