tidyverse / purrr

A functional programming toolkit for R
https://purrr.tidyverse.org/
Other
1.28k stars 272 forks source link

Mention `walk2()` in `map2.R` documentation Value section #1153

Open mfeinleib-hart opened 1 month ago

mfeinleib-hart commented 1 month ago

The documentation in map2.R inherits from map.R for the Value section:

#' @inherit map return

This is okay for the first 3 bullets. However, for the final bullet, the map2.R documentation still refers to walk() instead of walk2():

walk() returns the input .x (invisibly). This makes it easy to use in a pipe. The return value of .f() is ignored.

I think it's important to specify that walk2() returns the first of its two arguments, (fortunately still named .x). It's a small change, but it clarifies behavior that could be potentially confusing.

Link to online map2.R documentation