apply
import { apply } from "https://raw.githubusercontent.com/baetheus/fun/main/option.ts";
Apply a value A wrapped in an option to a function (a: A) => I wrapped in an Option. If either the wrapped value or the wrapped function are None then the result is None, if they are both Some then the result is Some.
@example
import * as O from "./option.ts";
import { pipe } from "./fn.ts";
const result1 = pipe(
O.some((n: number) => n + 1),
O.apply(O.some(1)),
); // Some(2)
const result2 = pipe(
O.some((n: number) => n + 1),
O.apply(O.none),
); // None