• Extract a numeric value from a FormulaResult, falling back to a caller-supplied default when the result is an error.

    Parameters

    • result: FormulaResult

      Result to inspect.

    • fallback: number

      Number returned when result.kind === 'error'.

    Returns number

    Either result.value or fallback.

    Convenient for tests that exercise success paths and treat errors as out-of-scope.