Functional programming (FP) is a programming style emphasizing functions that return consistent and predictable results regardless of a program's state. As a result, functional code is easier to test and reuse, simpler to parallelize, and less prone to bugs. Scala is an emerging JVM language that offers strong support for FP. Its familiar syntax and transparent interoperability with existing Java libraries make Scala a great place to start learning FP.
Functional Programming in Scala is a serious tutorial for programmers looking to learn FP and apply it to the everyday business of coding. The book guides readers from basic techniques to advanced topics in a logical, concise, and clear progression. In it, you'll find concrete examples and exercises that open up the world of functional programming.
You'll discover simple but powerful ideas and techniques that cut through the complexity of modern software engineering, including writing multi-core and distributed programs. You'll learn how FP gives you high confidence in the correctness of your code and helps you design software at high levels of abstraction so that even very large systems become comprehensible at a glance.
WHAT'S INSIDE:
Functional programming from square one in clear, readable language
No prior Scala experience needed
Learn both the hows and whys of FP
No prior experience with FP or Scala is required. Perfect for programmers familiar with FP in other languages wishing to apply their knowledge in Scala.
......(更多)
Paul Chiusano and Rúnar Bjarnason are recognized experts in functional programming with Scala. Each has been writing Scala and using FP professionally for several years. Paul is a Scalaz contributor, blogs and speaks regularly on Scala and FP. Rúnar is a principal contributor to Scalaz and the Functional Java library and has been using and teaching FP since 2008.
......(更多)
PART 1: INTRODUCTION TO FUNCTIONAL PROGRAMMING
1. What is functional programming? - FREE
2. Structuring functional programs - AVAILABLE
3. Functional data structures - AVAILABLE
4. Handling errors without exceptions - AVAILABLE
5. Strictness and laziness - AVAILABLE
6. Purely functional state - AVAILABLE
PART 2: FUNCTIONAL DESIGN AND COMBINATOR LIBRARIES
7. Purely functional parallelism - AVAILABLE
8. Property-based testing - AVAILABLE
9. Parser combinators
PART 3: COMMON STRUCTURES IN FUNCTIONAL DESIGN
10. Monoids
11. Monads
12. Applicative functors, traversable, and distributive data structures
PART 4: BREAKING THE RULES: EFFECTS AND I/O
13. External effects and I/O
14. Local effects and the ST monad
15. Stream processing and incremental I/O
Appendix A: Haskell, Scala and syntax
Appendix B: Scalaz, implicits, and large library organization
......(更多)
要想获得任何成都的平行,这就要求两个 unit 同时对参数求值并立即返回。
......(更多)