action-debian-package/node_modules/ramda/es/mean.js
Dawid Dziurla 9308795b8b
update
2020-03-26 15:37:35 +01:00

26 lines
474 B
JavaScript

import _curry1 from "./internal/_curry1.js";
import sum from "./sum.js";
/**
* Returns the mean of the given list of numbers.
*
* @func
* @memberOf R
* @since v0.14.0
* @category Math
* @sig [Number] -> Number
* @param {Array} list
* @return {Number}
* @see R.median
* @example
*
* R.mean([2, 7, 9]); //=> 6
* R.mean([]); //=> NaN
*/
var mean =
/*#__PURE__*/
_curry1(function mean(list) {
return sum(list) / list.length;
});
export default mean;