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

Chapter 2. Putting the Function in Functional Programming

In the first chapter, the basic concept of functions and how they are supported by lambda expressions in Java 8 were introduced. In this chapter, we will cover lambda expressions in more depth. We will explain how they satisfy the mathematical definition of a function and how we can use them in supporting Java applications.

In this chapter, you will cover several topics, including:

  • Lambda expression syntax and type inference
  • High-order, pure, and first-class functions
  • Referential transparency
  • Closure and currying
  • Common functional interfaces

Our discussions cover high-order functions, first-class functions, and pure functions. Also examined are the concepts of referential transparency, closure, and currying. Examples of nonfunctional approaches are followed by their functional equivalent where practical.

While we used lambda expression extensively in our examples, in the last part of this chapter, a little time will be spent examining their syntax and variations. We will also examine functional interfaces and many of the standard functional interfaces added to Java 8.

主站蜘蛛池模板: 昔阳县| 石嘴山市| 高青县| 正阳县| 泗洪县| 屯留县| 利津县| 台南市| 监利县| 潼南县| 遵化市| 龙南县| 米林县| 慈利县| 乌拉特中旗| 汕尾市| 满洲里市| 江安县| 东乌珠穆沁旗| 永昌县| 九龙城区| 盐池县| 涿州市| 福安市| 明水县| 樟树市| 阳新县| 英德市| 博湖县| 军事| 桓仁| 肃北| 广南县| 清镇市| 榕江县| 太白县| 南昌市| 浏阳市| 石狮市| 敖汉旗| 萨迦县|