Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/allouis/fmap

simple fmap fn
https://github.com/allouis/fmap

Last synced: 24 days ago
JSON representation

simple fmap fn

Awesome Lists containing this project

README

        

# fmap

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

```javascript
var fmap = require('fmap');

function add2(a) {
return a + 2;
}

fmap(add2)(Maybe(3)); //=> Just(5);
fmap(add2)(Maybe(null)); //=> Nothing();

```