1.0.2 • Published 10 years ago

monoid-average v1.0.2

Weekly downloads
13
License
-
Repository
github
Last release
10 years ago

Monoid Average

Build Status

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
1.0.2

10 years ago

1.0.1

10 years ago

1.0.0

10 years ago