Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/allouis/fmap
simple fmap fn
https://github.com/allouis/fmap
Last synced: 24 days ago
JSON representation
simple fmap fn
- Host: GitHub
- URL: https://github.com/allouis/fmap
- Owner: allouis
- Created: 2015-03-24T16:27:20.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-03-25T10:52:23.000Z (over 9 years ago)
- Last Synced: 2024-08-09T00:26:29.941Z (3 months ago)
- Language: JavaScript
- Size: 117 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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();```