checkedMul (Function)

Signature: checkedMul(a: t0, b: t0) -> Result<t0, Error>

Description: Named overflow-checked integer multiplication, returning Result<int, Error>.

Parameters

  • a (t0): The first factor
  • b (t0): The second factor

Returns: Result<t0, Error>

Example

let p = checkedMul(6, 7) ?: 0  // 42
p = checkedMul (6, 7) ?: 0  // 42