import { option } from "https://deno.land/x/fun@v.2.0.0-alpha.11/mod.ts";
const { getEq } = option;
Create an instance of Eq<Option> given an instance of Eq.
Examples
Example 1
Example 1
import * as O from "./option.ts";
import * as N from "./number.ts";
const Eq = O.getEq(N.EqNumber);
const result1 = Eq.equals(O.some(1))(O.some(2)); // false
const result2 = Eq.equals(O.some(1))(O.some(1)); // true
const result3 = Eq.equals(O.none)(O.none); // true
const result4 = Eq.equals(O.some(1))(O.none); // false
Parameters
S: Eq<A>