fmap

1.0.0 • Public • Published

fmap

Super simple fmap function, that takes a function and a functor and calls the functor fmap method, passing the function.

var fmap = require('fmap');
 
function add2(a) {
    return a + 2;
}
 
fmap(add2)(Maybe(3)); //=> Just(5);
fmap(add2)(Maybe(null)); //=> Nothing();
 

Dependencies (1)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i fmap

    Weekly Downloads

    2

    Version

    1.0.0

    License

    MIT

    Last publish

    Collaborators

    • allouis