A student in my intro #rstats class taught me something new today (by way of a cryptic "bug").
Suppose you're asked why this {purrr} code that should return the mean of each list element is not working as expected.
```
map(list(x=1:3, y=4:6), mean)
#> $x
#> [1] 1
#>
#> $y
#> [1] 4
```
What do you think is the simplest explanation for this behavior (in terms of the mistake that the student could've made)? It's not so obvious - there are multiple R "quirks" cascading!
Answer is in the images!