The left-side optional.
The zipped optional of tuple.
import { some, none, zip } from "./option.ts";
import { assertEquals } from "../deps.ts";
assertEquals(zip(some(1))(some("hi")), some([1, "hi"] as [number, string]));
assertEquals(zip(some(1))(none()), none());
assertEquals(zip(none())(some(1)), none());
assertEquals(zip(none())(none()), none());
Generated using TypeDoc
Zips two optionals into one.