Skip to content

Add flipped alias to partially apply match function #8

@roli93

Description

@roli93

Add an alias function that takes the same parameters in the inverse order so that when a function is completely definied by a match clause, it can be done more concisely:

Instead of:

    const getValueName = (number) =>  match (number) (
      (v= 1) => "one",
      (v= 2) => "two"
    )

We should be able to do:

    const getValueName = matching (
      (v= 1) => "one",
      (v= 2) => "two"
    )

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions