All instances of Eq must satisfy the following conditions:
Eq
Eq<A, B>
Eq<B, A>
Eq<B, C>
Eq<A, C>
Eq<A, A>
true
For example, the comparator below cannot implement Eq because that does not satisfy reflexive due to NaN === NaN always be false.
NaN === NaN
import { PartialEq } from "./partial-eq.ts";const numPartialEq: PartialEq<number, number> = { eq: (x, y) => x === y,}; Copy
import { PartialEq } from "./partial-eq.ts";const numPartialEq: PartialEq<number, number> = { eq: (x, y) => x === y,};
Readonly
Generated using TypeDoc
All instances of
Eqmust satisfy the following conditions:Eq<A, B>always equals toEq<B, A>.Eq<A, B>andEq<B, C>always impliesEq<A, C>.Eq<A, A>always returnstrue.For example, the comparator below cannot implement
Eqbecause that does not satisfy reflexive due toNaN === NaNalways be false.