- 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
推薦閱讀
- Python機(jī)器學(xué)習(xí):數(shù)據(jù)分析與評(píng)分卡建模(微課版)
- 數(shù)據(jù)結(jié)構(gòu)習(xí)題解析與實(shí)驗(yàn)指導(dǎo)
- 蘋(píng)果的產(chǎn)品設(shè)計(jì)之道:創(chuàng)建優(yōu)秀產(chǎn)品、服務(wù)和用戶體驗(yàn)的七個(gè)原則
- Web App Testing Using Knockout.JS
- RubyMotion iOS Develoment Essentials
- Arduino機(jī)器人系統(tǒng)設(shè)計(jì)及開(kāi)發(fā)
- Java RESTful Web Service實(shí)戰(zhàn)
- JSP應(yīng)用與開(kāi)發(fā)技術(shù)(第3版)
- Java EE 程序設(shè)計(jì)
- Effective Python:編寫(xiě)高質(zhì)量Python代碼的90個(gè)有效方法(原書(shū)第2版)
- ACE技術(shù)內(nèi)幕:深入解析ACE架構(gòu)設(shè)計(jì)與實(shí)現(xiàn)原理
- Instant OpenCV for iOS
- Kudu:構(gòu)建高性能實(shí)時(shí)數(shù)據(jù)分析存儲(chǔ)系統(tǒng)
- 零基礎(chǔ)輕松學(xué)Java
- Scratch趣味編程:邏輯思維培養(yǎng)與訓(xùn)練