monoid-average
v1.0.2
Published
An implementation of the average monoid
Downloads
1
Readme
Monoid Average
Fantasy Land Compliant!
An implementation of the average monoid in javascript
Example
var Average = require("monoid-average");
var list = [
new Average(52),
new Average(72),
new Average(42),
new Average(63),
new Average(65),
new Average(93)
];
var result = list.reduce(function(a, b) { return a.concat(b); });
console.log(result.value());
//prints 64.5