inst/examples/boolean/R/guard.R

is_valid <- function(x) {
  if (is.null(x)) return(FALSE)
  TRUE
}

all_valid <- function(xs) {
  ok <- TRUE
  for (x in xs) {
    if (!is_valid(x)) ok <- FALSE
  }
  ok
}

Try the muttest package in your browser

Any scripts or data that you put into this service are public.

muttest documentation built on May 14, 2026, 5:10 p.m.