import { type Eq } from "https://deno.land/x/fun@v2.0.0-alpha.10/eq.ts";
A Eq is an algebra with a notion of equality. Specifically, a Eq for a type T has an equal method that determines if the two objects are the same. Eqs can be combined, like many algebraic structures. The combinators for Eq in fun can be found in eq.ts.
An instance of a Eq must obey the following laws:
- Reflexivity: equals(a)(a) === true
- Symmetry: equals(a)(b) === equals(b)(a)
- Transitivity: if equals(a)(b) and equals(b)(c), then equals(a)(c)
The original type came from static-land