async_detect | R Documentation |
All predicates are running in parallel, and the returned match is not guaranteed to be the first one.
async_detect(.x, .p, ..., .limit = Inf)
.x |
A list or atomic vector. |
.p |
An asynchronous predicate function. |
... |
Additional arguments to the predicate function. |
.limit |
Number of elements to process simulateneously. If it is 1, then the predicate is applied sequentially. |
A deferred value for the result.
Other async iterators:
async_every()
,
async_filter()
,
async_map()
synchronise(async_detect(
c("https://eu.httpbin.org/status/404", "https://eu.httpbin.org",
"https://eu.httpbin.org/status/403"),
async_sequence(http_head, function(x) x$status_code == 200)
))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.