import { type Num } from "https://deno.land/x/rimbu@0.13.5/typical/mod.ts";
const { Mod } = Num;
Returns the remainder after dividing the first given natural number by the second.
Examples
Example 1
Example 1
Mod<0, 0> => never
Mod<9, 3> => 0
Mod<14, 5> => 4
definition: N2 extends 0 ? never : N1 extends 0 ? 0 : N1 extends N2 ? 0 : StrNum.ToNumber<StrNum.Divide<StrNum.FromNumber<N1>, StrNum.FromNumber<N2>>[1]>