Chapter 9 Functionals

Learning objectives:

  • Define functionals.
  • Use the purrr::map() family of functionals.
  • Use the purrr::walk() family of functionals.
  • Use the purrr::reduce() and purrr::accumulate() family of functionals.
  • Use purrr::safely() and purrr::possibly() to deal with failure.

9.1. Introduction

9.2. map()

9.3. purrr style

9.4. map_ variants

9.5. reduce() and accumulate family of functions

  • Some functions that weren’t covered