i think talking about library(purrr) here might be useful, as a drop-in replacement for for loops and so many other list manipulation cases