[−][src]Function libslide::partial_evaluator::flatten::flatten_expr
pub fn flatten_expr(expr: RcExpr) -> RcExpr
Attempts to flatten an expression, folding constant expressions and like terms.
Examples
1 + 2 + 3 -> 6
1 - 5x / x -> -4
Expressions flattened to a binary operation have the following conditions:
- Additions and subtractions become additions