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

What this book covers

Chapter 1, Grokking the Functional Way, gives you an eagle's eye view of functional programming and its advantages: succinct and readable code. Also, this chapter compares the command pattern in Java and Scala.

Chapter 2, Singletons, Factories, and Builders, covers singletons and Null Objects as specialized singletons. Scala Options are null objects. This also covers Scala's support for factory method and builders.

Chapter 3, Recursion and Chasing Your Own Tail, discusses the concept of recursion and Scala's support for it. It also looks at how recursion advocates immutability and the concept of structural sharing.

Chapter 4, Lazy Sequences – Being Lazy, Being Good, talks about eager versus lazy evaluation and the proxy design pattern. It also talks about Scala's streams and infinite lists.

Chapter 5, Taming Multiple Inheritance with Traits, covers Scala traits, mix-ins, and stackable modifications. It also covers dependency injection and the Cake pattern.

Chapter 6, Currying Favors with Your Code, covers lexical scope, closures, partially applied functions, and currying. This chapter also discusses the loan pattern, template method pattern, and another way to implement decorators.

Chapter 7, Of Visitors and Chains of Responsibilities, covers the Visitor pattern and its application. The other topics that are discussed are Scala's pattern matching capabilities and the chain of responsibility pattern. We will also learn Scala implementation using orElse and the collect idiom.

Chapter 8, Traversals – Mapping/Filtering/Folding/Reducing, covers iterators and functional iteration using map, filter, fold, and reduce. This chapter introduces Monads and explains ReduceLeft and ReduceRight.

Chapter 9, Higher Order Functions, discusses the strategy pattern and Scala version using higher order functions. It covers map as a functor, flatMap as a Monad, and foldLeft as Monoids. Here, you will also learn how to iterate lazy collections.

Chapter 10, Actors and Message Passing, showcases a case study to recursively grep a directory for files that contain matching text. It also covers the producer consumer pattern and the Master Slave pattern. It explains the concept of poison pills, event-driven programming, immutability, and concurrency. It also talks about Akka and Actors and how to reimplement recursive grep using Actors.

Chapter 11, It's a Paradigm Shift, teaches you how to sort in Scala and the Schwarzian transform implemented in Scala. It discusses functional error handling with Try/Success/Failure. And talks about Java Threads versus Scala's Futures. Scala's Parser Combinators are also discussed here.

主站蜘蛛池模板: 凤阳县| 兰坪| 彭水| 辉南县| 迁西县| 册亨县| 临邑县| 涞源县| 玉屏| 庆云县| 翁牛特旗| 临夏县| 余江县| 广西| 繁昌县| 南澳县| 集安市| 芜湖市| 阳新县| 云梦县| 津市市| 曲松县| 鞍山市| 潮州市| 朝阳区| 乌审旗| 吉林省| 博兴县| 鄢陵县| 菏泽市| 抚宁县| 尉犁县| 德庆县| 香格里拉县| 施甸县| 蓬溪县| 开平市| 建昌县| 临江市| 且末县| 始兴县|