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

Foldable

import type { Foldable } from "https://raw.githubusercontent.com/baetheus/fun/main/foldable.ts";

A Foldable structure has the method fold.

interface Foldable <U extends Kind> extends Hold<U> {
readonly fold: <A, O>(reducer: (accumulator: O, value: A) => O, accumulator: O) => <B = never, C = never, D = unknown, E = unknown>(ua: $<U, [A, B, C], [D], [E]>) => O;
}

§Type Parameters

§
U extends Kind
[src]

§Extends

§Properties

§
readonly fold: <A, O>(reducer: (accumulator: O, value: A) => O, accumulator: O) => <B = never, C = never, D = unknown, E = unknown>(ua: $<U, [A, B, C], [D], [E]>) => O
[src]