# NOT RUN {
new_list <- list(
hello = "World!",
nice = 2,
meet = "u"
)
Matchply(
new_list,
is.numeric -> "found a number!",
"{rld}" -> "maybe found 'World'!",
"u" | "z" -> "found a letter",
. -> "found nothing"
)
# }
Run the code above in your browser using DataLab