Pattern Matching and Enumerated Types in R

Inspired by pattern matching and enum types in Rust and many functional programming languages, this package offers an updated version of the 'switch' function called 'Match' that accepts atomic values, functions, expressions, and enum variants. Conditions and return expressions are separated by '->' and multiple conditions can be associated with the same return expression using '|'. 'Match' also includes support for 'fallthrough'. The package also replicates the Result and Option enums from Rust.


Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.


0.1.0 by Christopher Mann, 3 months ago

Browse source code at

Authors: Christopher Mann <[email protected]>

Documentation:   PDF Manual  

MIT + file LICENSE license

Depends on rlang, utils

Imported by refer.

See at CRAN