exists
import { exists } from "https://raw.githubusercontent.com/baetheus/fun/main/option.ts";
Apply a predicate to the inner value of an Option, returning true if the option is Some and the predicate returns true, otherwise returning false.
@example
import * as O from "./option.ts";
import { pipe } from "./fn.ts";
const positive = (n: number) => n > 0;
const result1 = pipe(O.some(1), O.exists(positive)); // true
const result2 = pipe(O.some(0), O.exists(positive)); // false
const result3 = pipe(O.none, O.exists(positive)); // false