inst/testme/test-furrr-future_walk.R

if (requireNamespace("purrr") && requireNamespace("furrr")) {
library(futurize)
library(purrr)

message("walk functions work")

x <- 1:5
out <- walk(x, ~"hello") |> futurize()
stopifnot(identical(out, x))

y <- 6:10
out <- walk2(x, y, ~"hello") |> futurize()
stopifnot(identical(out, x))

l <- list(x, y)
out <- pwalk(list(x, y), ~"hello") |> futurize()
stopifnot(identical(out, l))

out <- iwalk(x, ~"hello") |> futurize()
stopifnot(identical(out, x))

plan(sequential)
} ## if (requireNamespace("purrr") && requireNamespace("furrr"))

Try the futurize package in your browser

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

futurize documentation built on March 19, 2026, 1:07 a.m.