/** * @since 0.24.0 */ import type { Kind, TypeClass, TypeLambda } from "effect/HKT"; import type { Coproduct } from "./Coproduct.js"; import type { Monad } from "./Monad.js"; import type { Monoid } from "./Monoid.js"; /** * @category type class * @since 0.24.0 */ export interface Foldable extends TypeClass { readonly reduce: { (b: B, f: (b: B, a: A) => B): (self: Kind) => B; (self: Kind, b: B, f: (b: B, a: A) => B): B; }; } /** * Returns a default ternary `reduce` composition. * * @since 0.24.0 */ export declare const reduceComposition: (F: Foldable, G: Foldable) => (self: Kind>, b: B, f: (b: B, a: A) => B) => B; /** * @since 0.24.0 */ export declare const toArrayMap: (F: Foldable) => { (f: (a: A) => B): (self: Kind) => Array; (self: Kind, f: (a: A) => B_1): Array; }; /** * @since 0.24.0 */ export declare const toArray: (F: Foldable) => (self: Kind) => Array; /** * @since 0.24.0 */ export declare const combineMap: (F: Foldable) => (M: Monoid) => { (f: (a: A) => M): (self: Kind) => M; (self: Kind, f: (a: A) => M): M; }; /** * @since 0.24.0 */ export declare const reduceKind: (F: Foldable) => (G: Monad) => { (b: B, f: (b: B, a: A) => Kind): (self: Kind) => Kind; (self: Kind, b: B, f: (b: B, a: A_1) => Kind): Kind; }; /** * @since 0.24.0 */ export declare const coproductMapKind: (F: Foldable) => (G: Coproduct) => { (f: (a: A) => Kind): (self: Kind) => Kind; (self: Kind, f: (a: A) => Kind): Kind; }; //# sourceMappingURL=Foldable.d.ts.map