pub fn eval_constant(expr: &Expression) -> Option<Literal>
Expand description
Simplify an expression to a constant if possible
Returns:
None
if the expression cannot be simplified to a constant (e.g. if it contains a variable)
Some(Const)
if the expression can be simplified to a constant