Skip to content

Latest commit

 

History

History
75 lines (62 loc) · 1.62 KB

README.md

File metadata and controls

75 lines (62 loc) · 1.62 KB

cat.js

Category Theory for JavaScript

Circle CI NPM

😹 ➡️ 😼
⬇️ ↘️ ⬇️
🙀 ➡️ 😻

Install

Browser

<script src="//cdn.rawgit.com/jcouyang/cat.js/master/dist/cat.min.js"></script>

Node/Browserify

let {maybe, just} = require('cat.js');
maybe(false, Boolean, just(2))
// => true

Document

猫呢.js

😹 ➡️ 😼
⬇️ ↘️ ⬇️
🙀 ➡️ 😻

猫呢.js 是范畴论的 JavaScript 实现。大概移植 Haskell 但是更符合 JavaScript 的使用习惯。

安装

浏览器

<script src="//cdn.rawgit.com/jcouyang/cat.js/master/dist/cat.min.js"></script>

Node/Browserify

let {maybe, just} = require('cat.js');
maybe(false, Boolean, just(2))
// => true

文档

Todos

  • Maybe
    • Monoid
    • Functor
    • Applicative
    • Foldable
    • Traversable
    • Monad
    • MonadFix
    • MonadPlus
  • Either
    • Monoid
    • Functor
    • Applicative
    • Foldable
    • Traversable
    • Monad
    • MonadFix
    • MonadPlus
  • Try
  • Native
  • [-] Docs