import { type alt } from "https://deno.land/x/fun@v.2.0.0-alpha.11/mod.ts";
const { Alt } = alt;
An instance of Alt extends Functor and provides a new method called alt. This method takes two matching Kinds, left and right, and returns one of them. A good way to think of this is as a boolean or, where if the left kind is "false" then the right kind is returned.
An instance of alt must obey the following laws:
- Associativity: pipe(a, alt(b), alt(c)) === pipe(a, alt(pipe(b, alt(c))))
- Distributivity: pipe(a, alt(b), map(f)) === pipe(a, map(f), alt(pipe(b, map(f))))
The original type came from here