Skip to main content
Module

x/rimbu/typical/mod.ts>Num.IsEven

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

Returns true if the given natural number is even, or never otherwise.

Examples

Example 1

Even<4> => true
Even<11> => false
Even<-3> => never

Type Parameters

N extends number
definition: StrNum.IsEven<StrNum.FromNumber<N>>