Learn R Programming

matchr (version 0.1.0)

fallthrough: Fall Through Match

Description

Stop execution of current return expression in Match, then continue attempting to match conditions.

Usage

fallthrough()

Arguments

Value

Object of class 'fallthrough'

Examples

Run this code
# NOT RUN {
Match(
  "abc",
  is.character -> {
    print("Found a character.")
    fallthrough()
  },
  "abc" -> "start of the alphabet",
  .     -> "found nothing"
)
# }

Run the code above in your browser using DataLab