discrepancy in description for Foldw/MatchW for Either vs TaskEither
Author: FilipLazCreated Nov 7, 2024Updated Nov 7, 2024
Documentation
Looking at the documentation I am confused in method signature for Foldw/MatchW between Either and TaskEither
Either
foldW and matchW have exact same signature
foldW
export declare const foldW: <E, B, A, C>(onLeft: (e: E) => B, onRight: (a: A) => C) => (ma: Either<E, A>) => B | CmatchW
export declare const matchW: <E, B, A, C>(onLeft: (e: E) => B, onRight: (a: A) => C) => (ma: Either<E, A>) => B | CTaskEither
foldW and matchW are different
foldW
export declare const foldW: <E, B, A, C>(
onLeft: (e: E) => T.Task<B>,
onRight: (a: A) => T.Task<C>
) => (ma: TaskEither<E, A>) => T.Task<B | C>matchW
export declare const matchW: <E, B, A, C>(
onLeft: (e: E) => B,
onRight: (a: A) => C
) => (ma: TaskEither<E, A>) => T.Task<B | C>What would be an adequate explanation for this?
Source: gcanti/fp-ts