#1955·fp-ts

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

javascript
export declare const foldW: <E, B, A, C>(onLeft: (e: E) => B, onRight: (a: A) => C) => (ma: Either<E, A>) => B | C

matchW

javascript
export declare const matchW: <E, B, A, C>(onLeft: (e: E) => B, onRight: (a: A) => C) => (ma: Either<E, A>) => B | C

TaskEither

foldW and matchW are different

foldW

javascript
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

javascript
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?