Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/rimbu/typical/num.ts>Mult

Rimbu is a TypeScript library focused on immutable, performant, and type-safe collections and other tools.
Go to Latest
type alias Mult
import { type Mult } from "https://deno.land/x/rimbu@1.0.2/typical/num.ts";

Returns the result of multiplying the given natural numbers.

Examples

Example 1

Mult<0, 0> => 0
Mult<9, 10> => 90
Mult<3, 18> => 54

Type Parameters

N1 extends number
N2 extends number
definition: N1 extends 0 ? 0 : N2 extends 0 ? 0 : N1 extends 1 ? N2 : N2 extends 1 ? N1 : StrNum.ToNumber<StrNum.Mult<StrNum.FromNumber<N1>, StrNum.FromNumber<N2>>>