matchr: 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.

Version: 0.1.0
Depends: R (≥ 3.5.0), rlang, utils
Published: 2021-09-09
DOI: 10.32614/CRAN.package.matchr
Author: Christopher Mann
Maintainer: Christopher Mann <cmann3 at>
License: MIT + file LICENSE
NeedsCompilation: no
CRAN checks: matchr results


Reference manual: matchr.pdf


Package source: matchr_0.1.0.tar.gz
Windows binaries: r-devel:, r-release:, r-oldrel:
macOS binaries: r-release (arm64): matchr_0.1.0.tgz, r-oldrel (arm64): matchr_0.1.0.tgz, r-release (x86_64): matchr_0.1.0.tgz, r-oldrel (x86_64): matchr_0.1.0.tgz

Reverse dependencies:

Reverse imports: refer


Please use the canonical form to link to this page.