import { O } from "https://deno.land/x/ahh@v0.10.0/src/option/mod.ts";
Return opt
if it is a Some
, or other
.
Examples
import { O, None } from "./mod.ts";
console.log(O.or(1, 2)); // 1
console.log(O.or(None, 2)); // 2
console.log(O.or(2, None)); // 2
console.log(O.or(None, None)); // undefined