Skip to content

Operation<TStart, TRes, TError> #45

@XDracam

Description

@XDracam

Problem:

Op<TStart, Result<TRes, TErr>>.Chain(Op<TRes, TNewRes>)

Problem: not possible without .FlatMap because we might not have a TRes yet, so we can't just chain without early failure, so we need proper error handling.

Other benefits

Early cancellation, reporting in which step we failed

Considerations

Do not use fancy inheritance, like making that a subtype of Operation<TStart, Result<TRes, TErr>> to avoid confusion, complexity, edge cases and potential LSP violations

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions