- Redux Quick Start Guide
- James Lee Tao Wei Suresh Kumar Mukhiya
- 120字
- 2021-07-02 12:40:29
Compositions
A composition is a very important concept of functional programming; it is how we create a higher-order function by consuming and combining simpler functions.
Let's just use the sum function that we defined previously. We can split the sum function into the following composition:
const sum = a => b => a + b
sum(2)(5)
Any function can be transformed into a composable function via the concept of currying. Explaining these fundamental functional concepts is beyond the scope of this book, and we suggest that you get familiar with functional terms as much as possible, in order to get a full understanding of Redux and React. We will consume a composition function from Redux, called compose, in upcoming chapters.
推薦閱讀
- ASP.NET Core:Cloud-ready,Enterprise Web Application Development
- 案例式C語言程序設計
- SQL for Data Analytics
- Python高效開發實戰:Django、Tornado、Flask、Twisted(第3版)
- SQL Server從入門到精通(第3版)
- Python算法指南:程序員經典算法分析與實現
- Visual Foxpro 9.0數據庫程序設計教程
- 代碼閱讀
- 新印象:解構UI界面設計
- Node.js區塊鏈開發
- Oracle 12c從入門到精通(視頻教學超值版)
- SSH框架企業級應用實戰
- INSTANT JQuery Flot Visual Data Analysis
- 實戰Python網絡爬蟲
- 游戲設計的底層邏輯