Skip to content

Should match's return type be void? #4

@bwestergard

Description

@bwestergard

Shouldn't the return type of match, and by extension the MatchBlock type, be polymorphic?

type MatchBlock<R, T, F> = {
  Ok(value: T): R;
  Fail(failure: F): R;
}
// ...
match(block: MatchBlock<R, T, F>): R;

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