文档介绍:.info
MEAP Edition
Manning Early Access Program
Functional Programming in Scala
version 10
Copyright 2013 Manning Publications
For more information on this and other Manning titles go to
.info
brief contents
PART 1: INTRODUCTION TO FUNCTIONAL PROGRAMMING
1. What is functional programming?
2. Getting Started
3. Functional data structures
4. Handling errors without exceptions
5. Strictness and laziness
6. Purely functional state
PART 2: FUNCTIONAL DESIGN BINATOR LIBRARIES
7. Purely functional parallelism
8. Property-based testing
9. binators
PART 3: FUNCTIONAL DESIGN PATTERNS
10. Monoids
11. Monads
12. Applicative and traversable functors
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
.info
1
PPreface
About this book
This is not a book about Scala. This book introduces the concepts and techniques
of functional programming (FP)—we use Scala as the vehicle, but the lessons
herein can be applied to programming in any language. Our goal is to give you the
foundations to begin writing substantive functional programs and fortably
absorb new FP concepts and techniques beyond those covered here. Throughout
the book we rely heavily on programming exercises, carefully chosen and
sequenced to guide you to discover FP for yourself. Expository text is often just
enough to lead you to the next exercise. Do these exercises and you will learn the
material. Read without doing and you will find yourself lost.
A word of caution: no matter how long you've been programming, learning FP
is challenging. Come prepared to be a beginner once again. FP proceeds from a
startling premise—that we construct programs using only pure functions, or
functions that avoid side effects like writing to a database or reading from a file. In
the first chapter