Copyright
Brief Table of Contents
Table of Contents
Preface
Acknowledgments
About this Book
1. Core concepts
Chapter 1. Introducing functional programming
1.1. What is this thing called functional programming?
1.1.1. Functions as first-class values
1.1.2. Avoiding state mutation
1.1.3. Writing programs with strong guarantees
1.2. How functional a language is C#?
1.2.1. The functional nature of LINQ
1.2.2. Functional features in C# 6 and C# 7
1.2.3. A more functional future for C#?
1.3. Thinking in functions
1.3.1. Functions as maps
1.3.2. Representing functions in C#
1.4. Higher-order functions
1.4.1. Functions that depend on other functions
1.4.2. Adapter functions
1.4.3. Functions that create other functions
1.5. Using HOFs to avoid duplication
1.5.1. Encapsulating setup and teardown into a HOF
1.5.2. Turning the using statement into a HOF
1.5.3. Tradeoffs of HOFs
1.6. Benefits of functional programming
Exercises
Summary
Chapter 2. Why function purity matters
2.1. What is function purity?
2.1.1. Purity and side effects