map
import { map } from "https://raw.githubusercontent.com/baetheus/fun/main/option.ts";
Apply the mapping function fai to the inner value of an Option if it exists. If the option is None then this function does nothing.
@example
import * as O from "./option.ts";
import { pipe } from "./fn.ts";
const result1 = pipe(O.some(1), O.map(n => n + 1)); // Some(2)
const result2 = pipe(O.none, O.map((n: number) => n + 1)); // None