Closed DavisVaughan closed 1 year ago
We should probably do this, but maybe in tidyr we should also use an anonymous function rather than passing all the arguments through ...
?
Yea I think so too. I think this is the second case we've seen where providing an anonymous function is probably better than providing extra args through ...
? The other one being map()
? I wonder if we want to discourage using ...
anywhere in the docs
You mean like this? 😛
Like with
map_(..error_call)
, we need to rename theerror_call
arg ofreduce_impl()
to something less liable to conflict with user arguments passed through...
In tidyr, with dev purrr installed some snapshot tests change and I see this incorrect error call of
fn()
This is due to
df_unchop()
callingreduce()
and passingerror_call
through, but it gets captured early byreduce_impl()
and isn't passed through tounchop_sizes2()
.I suggest that we rename all of these cases to
purrr_error_call
and.purrr_error_call
(in cases when we dot the args, for consistency) to eliminate potential conflicts and have a consistent way to handle thisWe should probably see if there are other places this can come up