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

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
主站蜘蛛池模板: 当涂县| 扶沟县| 昆山市| 罗田县| 新乐市| 蓝田县| 襄樊市| 永定县| 固安县| 惠安县| 确山县| 蒙城县| 民勤县| 长垣县| 察哈| 沈丘县| 淳化县| 博湖县| 唐河县| 彩票| 高雄市| 郁南县| 通化市| 边坝县| 海兴县| 叶城县| 手游| 双城市| 邛崃市| 迭部县| 巧家县| 咸阳市| 忻城县| 永善县| 酉阳| 郴州市| 长葛市| 南溪县| 河南省| 南陵县| 唐山市|