The flattened optional.
import { flatten, some, none } from "./option.ts";
import { assertEquals } from "../deps.ts";
assertEquals(flatten(some(some(6))), some(6));
assertEquals(flatten(some(none())), none());
assertEquals(flatten(none()), none());
Generated using TypeDoc
Flattens the nested optional.