Niche Portobello Mushroom
    Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

    monoid-maxpublic

    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 

    Keywords

    none

    install

    npm i monoid-max

    Downloadslast 7 days

    0

    version

    1.0.3

    license

    none

    repository

    github.com

    last publish

    collaborators

    • avatar