Skip to main content

collapse_value

Function collapse_value 

Source
pub fn collapse_value(
    pool: &ExprPool,
    builtins: &BuiltinSymbols,
    v: &Value,
) -> Option<Number>
Expand description

Collapse a Value to a number (spec §9): Number is returned as-is, Expr is evaluated numerically, everything else (including Undefined/Indeterminate/arrays) yields None.