Nautilus: Pelagic Mollusc
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

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();
 

install

npm i fmap

Downloadsweekly downloads

2

version

1.0.0

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability