Examples for 'promises::promise_map'


Promise-aware lapply/map

Aliases: promise_map

Keywords:

### ** Examples

# Waits x seconds, then returns x*10
wait_this_long <- function(x) {
  promise(~later::later(~{
    resolve(x*10)
  }, delay = x))
}

promise_map(list(A=1, B=2, C=3), wait_this_long) %...>%
  print()

[Package promises version 1.2.0.1 Index]