enter

# `map()`

Applies a function to every element of a list.  
Returns the results as a list.


```r
map(.x, .f, ‚Ä¶)
```

--

*"for every element of `.x` do `.f`"*

---
class: middle

.center[

# `map()`

Applies a function to every element of a list.  
Returns the results as a list.
]


```r
map(
  .x, # list or vector
  .f, # function to apply to each list element
  ... # other args to pass to function
  )
```

---
class: middle, center

![](https://raw.githubusercontent.com/hadley/adv-r/master/d