mean function

num mean (
  1. List<num> data
)

Implementation

num mean(List<num> data) {
  return data.fold(
        0,
        (num a, num b) => a + b,
      ) /
      data.length;
}