learn:functional-programming
**這是本文件的舊版!**
Functional Programming 筆記
Library
值 vs Functor
f | g | composition |
---|---|---|
pure | pure | compose(f, g) |
effects | pure(unary) | f.map(g) |
effects | pure(n-ary) | f1.map(g).ap(f2) |
effects | effects | m.chain(f).chain(g) |
Functor
- Either
- Future
- Identity
- IO
- Maybe: 專門處理無值( null || undefined ) 情境
- Reader
- Tuple
- State
Articles
learn/functional-programming.1655789641.txt.gz · 上一次變更: 2024/12/22 21:17 (外部編輯)