Bifoldable overview
A foldable typeclass for data types with two type parameters.
Added in v1.0.0
Table of contents
Typeclass
Bifoldable (interface)
Signature
export interface Bifoldable<F> {
readonly URI: F
readonly bireduce: <A, B, C>(fa: HKT2<F, A, B>, b: C, f: (c: C, a: A) => C, g: (c: C, b: B) => C) => C
readonly bireduceRight: <A, B, C>(fa: HKT2<F, A, B>, b: C, f: (a: A, c: C) => C, g: (b: B, c: C) => C) => C
readonly bifoldMap: <M>(M: Monoid<M>) => <A, B>(fa: HKT2<F, A, B>, f: (a: A) => M, g: (b: B) => M) => M
}
Added in v1.0.0
Bifoldable2 (interface)
Signature
export interface Bifoldable2<F extends URIS2> {
readonly URI: F
readonly bireduce: <A, B, C>(fa: Kind2<F, A, B>, b: C, f: (c: C, a: A) => C, g: (c: C, b: B) => C) => C
readonly bireduceRight: <A, B, C>(fa: Kind2<F, A, B>, b: C, f: (a: A, c: C) => C, g: (b: B, c: C) => C) => C
readonly bifoldMap: <M>(M: Monoid<M>) => <A, B>(fa: Kind2<F, A, B>, f: (a: A) => M, g: (b: B) => M) => M
}
Added in v1.0.0
Utilities
biall
Signature
export declare function biall<T extends URIS2, C>(
T: Bifoldable2<T>,
C: BooleanAlgebra<C>
): <A, B>(pl: (a: A) => C, pr: (b: B) => C) => (fa: Kind2<T, A, B>) => C
Added in v1.0.0
biany
Signature
export declare function biany<T extends URIS2, C>(
T: Bifoldable2<T>,
C: BooleanAlgebra<C>
): <A, B>(pl: (a: A) => C, pr: (b: B) => C) => (fa: Kind2<T, A, B>) => C
Added in v1.0.0
bifold
Signature
export declare function bifold<T extends URIS2>(T: Bifoldable2<T>): <M>(M: Monoid<M>) => (fa: Kind2<T, M, M>) => M
Added in v1.0.0