monoid-max

An implementation of the max monoid

npm install monoid-max
6 downloads in the last week
12 downloads in the last month

Monoid Max

Build Status

Fantasy Land Compliant! Indigenous Complaint!

An implementation of the max monoid in javascript

Example

var Max = require("monoid-max");

var list = [
    new Max(52),
    new Max(72),
    new Max(42),
    new Max(63),
    new Max(65),
    new Max(93)
];

var result = list.reduce(function(a, b) { return a.concat(b); });

console.log(result.value());
//prints 93
npm loves you