Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

alt

import { alt } from "https://github.gh-proxy.cn/raw.githubusercontent.com/baetheus/fun/main/datum.ts";

Provide an alternative Datum if the current one has no value.

@example
import { alt, initial, replete } from "./datum.ts";
import { pipe } from "./fn.ts";

const result1 = pipe(initial, alt(replete("fallback"))); // Replete("fallback")
const result2 = pipe(replete("data"), alt(replete("fallback"))); // Replete("data")
function alt<A>(tb: Datum<A>): (ta: Datum<A>) => Datum<A>;
§
alt<A>(tb: Datum<A>): (ta: Datum<A>) => Datum<A>
[src]

§Type Parameters

§Parameters

§Return Type

§
(ta: Datum<A>) => Datum<A>
[src]