Open mgirlich opened 1 year ago
Hard to see how to fix without breaking this test:
test_that("primitive functions are wrapped", {
expect_identical(as_mapper(`-`)(.y = 10, .x = 5), -5)
expect_identical(as_mapper(`c`)(1, 3, 5), c(1, 3, 5))
})
But maybe that's ok since we don't generally expect -
to respect named arguments?
Nearly half the time in this example is spend in
as_mapper.default()
. The issue iThis leads to the curious situation that it is faster to manually wrap
is.null()
yourself in a function:Created on 2023-07-05 with reprex v2.0.2