import { Eq } from "https://deno.land/x/rimbu@0.13.0/common/index.ts";
const { tupleSymmetric } = Eq;
Returns an Eq
instance for tuples that considers two tuples [A, B] and [C, D] equal if [A, B] equals [C, D],
or if [A, B] equals [D, C]
Examples
Example 1
Example 1
const eq = Eq.tupleSymmetric()
console.log(eq([1, 2], [1, 2]))
// => true
console.log(eq([1, 2], [2, 1]))
// => true
console.log(eq([1, 3], [2, 1]))
// => false