import { some } from "https://deno.land/x/fun@v2.0.0/set.ts";
Operates like Array.some, testing values in a ReadonlySet with a Predicate until either the predicate returns true for a value or all of the values have been tested. Shortcircuits on the first value that returns true. This is the dual of every.
Examples
Example 1
Example 1
import * as S from "./set.ts";
const some = S.some((n: number) => n > 0);
const result1 = some(S.set(1, 2, 3)); // true
const result2 = some(S.set(0)); // false
const result3 = some(S.init()); // false
const result4 = some(S.set(-1, -2, -3, 1)); // true