pass `fn` to `mean`