Category Theory for JavaScript
😹 ➡️ 😼
⬇️
🙀 ➡️ 😻
<script src="//cdn.rawgit.com/jcouyang/cat.js/master/dist/cat.min.js"></script>
let {maybe, just} = require('cat.js');
maybe(false, Boolean, just(2))
// => true
😹 ➡️ 😼
⬇️
🙀 ➡️ 😻
猫呢.js 是范畴论的 JavaScript 实现。大概移植 Haskell 但是更符合 JavaScript 的使用习惯。
<script src="//cdn.rawgit.com/jcouyang/cat.js/master/dist/cat.min.js"></script>
let {maybe, just} = require('cat.js');
maybe(false, Boolean, just(2))
// => true
- Maybe
- Monoid
- Functor
- Applicative
- Foldable
- Traversable
- Monad
- MonadFix
- MonadPlus
- Either
- Monoid
- Functor
- Applicative
- Foldable
- Traversable
- Monad
- MonadFix
- MonadPlus
- Try
- Native
- [-] Docs