- 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.
推薦閱讀
- Go Web編程
- Facebook Application Development with Graph API Cookbook
- INSTANT OpenCV Starter
- Android 9 Development Cookbook(Third Edition)
- 零基礎學Java(第4版)
- Learning Three.js:The JavaScript 3D Library for WebGL
- Unity Game Development Scripting
- 飛槳PaddlePaddle深度學習實戰
- 工業機器人離線編程
- SwiftUI極簡開發
- Julia High Performance(Second Edition)
- Shopify Application Development
- 征服C指針(第2版)
- Java程序設計入門(第2版)
- Windows 10 for Enterprise Administrators