[−][src]Function libslide::partial_evaluator::flatten::flatten_add_or_sub
fn flatten_add_or_sub(o_lhs: RcExpr, o_rhs: RcExpr, is_subtract: bool) -> RcExpr
Flattens an addition or subtraction, folding constants and like terms as far as possible. The flattened expression is always normalized to an addition.
1 + 2x - 3 + x -> -2 + 3x