import { option } from "https://deno.land/x/fun@v2.0.0/mod.ts";
const { fromPredicate } = option;
The fromPredicate function will test the value a with the predicate. If the predicate evaluates to false then the function will return a None, otherwise it will return the value wrapped in Some.
Type Parameters
B extends A