The function from T to U.
The function from Option<T> to Option<U>.
import { some, map, none } from "./option.ts";
import { assertEquals } from "../deps.ts";
const strLen = map((str: string) => str.length);
assertEquals(strLen(some("Hello, World!")), some(13));
assertEquals(strLen(none()), none());
Generated using TypeDoc
Maps the function onto
Option.