7.9 Exercise

Write a pipeline that caclculates the mean of each simulation

sim_invoked %>%
    mutate(estimate = map_dbl(sim, mean))
## # A tibble: 3 x 4
##   f     params           sim        estimate
##   <chr> <list>           <list>        <dbl>
## 1 runif <named list [2]> <dbl [10]>   -0.110
## 2 rnorm <named list [1]> <dbl [10]>   -0.614
## 3 rpois <named list [1]> <int [10]>    9.7