loop: Apply an rmonad pipeline function to each element in a rmonad...

Description Usage Arguments Value Examples

View source: R/parallel.R

Description

Apply an rmonad pipeline function to each element in a rmonad bound list

Usage

1
loop(m, FUN, looper = lapply, ...)

Arguments

m

Rmonad object wrapping a vector

FUN

function of an element from the vector stored in m that returns an Rmonad object.

looper

function that applies each element in the input vector to FUN. The default it lapply.

...

Additional arguments sent to FUN

Value

Rmonad object wrapping a vector of the values wrapped by the outputs of FUN

Examples

1
2
foo <- function(x) { x %>>% sqrt }
c(256, 6561) %v>% sqrt %>% loop(foo) %>>% lapply(sqrt)

arendsee/rmonad documentation built on Dec. 19, 2020, 9:06 p.m.