You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
library(rlang)
library(purrr)
x <- expr(foo(a, b, 10))
modify(x, ~ if (is.numeric(.x)) .x + 10 else .x)
We should probably expand the vector definition to include pairlists (this will require custom code but it's probably worth it as the connections between purrr and rlang become stronger)
The text was updated successfully, but these errors were encountered:
For map(), this will require a different approach to map_impl() + call_loop() which currently generates calls of the form f(x[[i]]) modifying the value of i in an environment. Instead will need to generate __x_i by looping over the pairlist. For efficiently, will also need to name output as we go using the TAG().
May also be worth a custom modify() method because replacement with [[<- is unlikely to be efficient.
In the short term, might be better to just coerce back and forth to a list, not worrying about efficiency.
We should probably expand the vector definition to include pairlists (this will require custom code but it's probably worth it as the connections between purrr and rlang become stronger)
The text was updated successfully, but these errors were encountered: