- Mastering JavaScript Functional Programming
- Federico Kereki
- 134字
- 2021-07-02 22:41:12
Starting Out with Functions - A Core Concept
In chapter 2, Thinking Functionally - A First Example, we went over an example of FP thinking, but let's now go to the basics, and review functions. In Chapter 1, Becoming Functional - Several Questions, we mentioned that two important JS features were functions as first-class objects and closures. Now, in this chapter, let's:
- Examine some key ways of defining functions in JS
- Go in detail regarding arrow functions, which are closest to the lambda calculus functions
- Introduce the concept of currying
- Revisit the concept of functions as first-class objects
We'll also consider several FP techniques, such as:
- Injection, as needed for sorting with different strategies and other uses
- Callbacks and promises, introducing the continuation passing style
- Polyfilling and stubbing
- Immediate invocation schemes
推薦閱讀
- Cocos2d Cross-Platform Game Development Cookbook(Second Edition)
- Java多線程編程實戰指南:設計模式篇(第2版)
- ThinkPHP 5實戰
- Python數據分析基礎
- CentOS 7 Server Deployment Cookbook
- 樂高機器人設計技巧:EV3結構設計與編程指導
- Mastering Predictive Analytics with Python
- jQuery開發基礎教程
- R Deep Learning Cookbook
- Python深度學習:基于TensorFlow
- Node.js Design Patterns
- C語言程序設計
- Node.js開發指南
- Django實戰:Python Web典型模塊與項目開發
- Mastering Gephi Network Visualization