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

getCombineAll

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

Given an Initializable, create a function that will iterate through an array of values and combine them. This is not much more than Array.fold(combine).

@example
import * as I from "./initializable.ts";
import * as N from "./number.ts";

const sumAll = I.getCombineAll(N.InitializableNumberSum);

const result = sumAll(1, 30, 80, 1000, 52, 42); // sum === 1205
function getCombineAll<A>({ combine, init }: Initializable<A>): (...as: ReadonlyArray<A>) => A;
§
getCombineAll<A>({ combine, init }: Initializable<A>): (...as: ReadonlyArray<A>) => A
[src]

§Type Parameters

§Parameters

§
{ combine, init }: Initializable<A>
[src]

§Return Type

§
(...as: ReadonlyArray<A>) => A
[src]