Would be great to have a helper to calculate the mean of an iterator of items which are both summable and divisable, by summing the elements and then dividing by the amount of elements.
In my case useful because I want the mean after calling filter_map, which means I now need to either collect or iterate in a for loop and count up.
Would be great to have a helper to calculate the mean of an iterator of items which are both summable and divisable, by summing the elements and then dividing by the amount of elements. In my case useful because I want the mean after calling
filter_map
, which means I now need to eithercollect
or iterate in a for loop and count up.