inst/modules/purrr.R

#| config(rules = basic_rules(), deparsers = default_deparsers())

map <- function(x, f) {
    return(x$map(f))
}

reduce <- function(x, f) {
    return(x$reduce(f))
}

reduce_right <- function(x, f) {
    return(x$reduceRight(f))
}

filter <- function(x, f) {
    return(x$filter(f))
}

walk <- function(x, f) {
    return(x$forEach(walk))
}

all <- function(x, f) {
    return(x$every(f))
}

any <- function(x, f) {
    return(x$some(f))
}

Try the sketch package in your browser

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

sketch documentation built on Oct. 23, 2022, 5:07 p.m.