tests/testthat/helper-parser.R

generator_body <- function(fn) {
  info <- machine_info("generator", env = caller_env())
  walk_states(body(fn), info = info)
}

async_body <- function(fn) {
  info <- machine_info("async", env = caller_env())
  walk_states(body(fn), info = info)
}

async_generator_body <- function(fn) {
  info <- machine_info("async_generator", env = caller_env())
  walk_states(body(fn), info = info)
}

Try the coro package in your browser

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

coro documentation built on July 19, 2022, 5:06 p.m.