import { semigroup } from "https://deno.land/x/fun@v.2.0.0-alpha.11/mod.ts";
const { constant } = semigroup;
Create a semigroup that always returns the given value, ignoring anything that it is concatenated with.
Examples
Example 1
Example 1
import * as SG from "./semigroup.ts";
import { pipe } from "./fn.ts";
const { concat } = SG.constant("cake");
const whatDoWeWant = pipe(
"apples",
concat("oranges"),
concat("bananas"),
concat("pie"),
concat("money"),
); // whatDoWeWant === "cake"
Parameters
a: A