import { array } from "https://deno.land/x/fun@v2.0.0-alpha.6/mod.ts";
const { getMonoid } = array;
Create an instance of Monoid<ReadonlyArray> given a type A. This instance uses array concat and empty as the instance methods for the Monoid.
Examples
Example 1
Example 1
import * as A from "./array.ts";
import { pipe } from "./fn.ts";
const monoid = A.getMonoid<number>();
const result = pipe(
monoid.empty(), // []
monoid.concat([1, 2, 3]),
); // [1, 2, 3]