Thanks to visit codestin.com
Credit goes to github.com

Skip to content

discrepancy in description for Foldw/MatchW for Either vs TaskEither Β #1955

@FilipLaz

Description

@FilipLaz

πŸ“– 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 | C

matchW

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

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions