Treatment checkedDiv
std/ops/num::checkedDiv
Generics
◻ N:
CheckedDiv
Inputs
⇥ a:
Stream<N>
⇥ b:
Stream<N>
Outputs
↦ quot:
Stream<Option<N>>
Divide values from two streams, checking if division is possible or if overflow occurs.
Values passed through a
are divided by b
and send in quot
.
This treatment outputs an option containing a ÷ b
, or none if division is not possible (as division by 0), or result cause overflow in data type.