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

constant

import { constant } from "https://raw.githubusercontent.com/baetheus/fun/main/combinable.ts";

Create a combinable that always returns the given value, ignoring anything that it is combineenated with.

@example
import * as SG from "./combinable.ts";
import { pipe } from "./fn.ts";

const { combine } = SG.constant("cake");

const whatDoWeWant = pipe(
  "apples",
  combine("oranges"),
  combine("bananas"),
  combine("pie"),
  combine("money"),
); // whatDoWeWant === "cake"
function constant<A>(a: A): Combinable<A>;
§
constant<A>(a: A): Combinable<A>
[src]

§Type Parameters

§Parameters

§Return Type