官术网_书友最值得收藏!

Starting Out with Functions - A Core Concept

In chapter 2Thinking 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
主站蜘蛛池模板: 沁阳市| 长乐市| 邹平县| 滦平县| 图片| 桂阳县| 宁乡县| 阳泉市| 罗平县| 阿城市| 明光市| 琼结县| 卓资县| 庆云县| 贵阳市| 理塘县| 水富县| 永德县| 哈密市| 温宿县| 三穗县| 望城县| 南汇区| 阳曲县| 遂平县| 沿河| 商南县| 普安县| 南木林县| 延安市| 海盐县| 甘洛县| 环江| 汕尾市| 常德市| 高平市| 南陵县| 榆中县| 铁岭县| 吉安县| 江北区|