Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

every

import { every } from "https://github.gh-proxy.cn/raw.githubusercontent.com/baetheus/fun/main/set.ts";

Operates like Array.every, testing values in a ReadonlySet with a Predicate until either the predicate returns false for a value or all of the values have been tested as true. Shortcircuits on the first value that returns false. This is the dual of some.

@example
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
function every<A>(predicate: Predicate<A>): (ua: ReadonlySet<A>) => boolean;
§
every<A>(predicate: Predicate<A>): (ua: ReadonlySet<A>) => boolean
[src]

§Type Parameters

§Parameters

§
predicate: Predicate<A>
[src]

§Return Type

§
(ua: ReadonlySet<A>) => boolean
[src]