- 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.
推薦閱讀
- Java程序設計與開發
- The DevOps 2.3 Toolkit
- ASP.NET Core 5.0開發入門與實戰
- DevOps Automation Cookbook
- Java程序員面試算法寶典
- MATLAB定量決策五大類問題
- 學Python也可以這么有趣
- Cocos2d-x學習筆記:完全掌握Lua API與游戲項目開發 (未來書庫)
- Babylon.js Essentials
- 代替VBA!用Python輕松實現Excel編程
- Flask Web開發:基于Python的Web應用開發實戰(第2版)
- 多媒體技術及應用
- Visual C++程序設計與項目實踐
- Less Web Development Cookbook
- PHP 7 Programming Blueprints