This is equivalent to using the $then() method of a deferred, but it is easier to use programmatically.

async_sequence(..., .list = NULL)

Arguments

...

Asynchronous functions to compose.

.list

Mose asynchronous functions to compose.

Value

Asynchronous function, the composition of all input functions. They are performed left to right, the ones in .list are the last ones.

See also

Examples

# \donttest{
check_url <- async_sequence(
  http_head, function(x) identical(x$status_code, 200L))
synchronise(check_url("https://eu.httpbin.org/status/404"))
#> [1] FALSE
synchronise(check_url("https://eu.httpbin.org/status/200"))
#> [1] TRUE
# }