NEWS on version 0.2.3 says:
For instance + is transformed to function(.x, .y) .x + .y. This
results in proper argument matching so that map(1:10, partial(-, .x = 5)) produces list(5 - 1, 5 - 2, ...).
If I understand correctly, using .y instead of .x, map(1:10, partial(-, .y = 5)), will produce list(1 - 5, 2 - 5, ...), right? But it won't:
map_int(1:10, partial(`-`, .y = 5L))
#> [1] 4 3 2 1 0 -1 -2 -3 -4 -5
Any argument will produce the same result. What does it mean by "proper argument matching" here? Should I use as_mapper() explicitly by myself?
map_int(1:10, partial(`-`, any_inproper_argument = 5L))
#> [1] 4 3 2 1 0 -1 -2 -3 -4 -5
NEWS on version 0.2.3 says:
If I understand correctly, using
.yinstead of.x,map(1:10, partial(-, .y = 5)), will producelist(1 - 5, 2 - 5, ...), right? But it won't:Any argument will produce the same result. What does it mean by "proper argument matching" here? Should I use
as_mapper()explicitly by myself?