Chapter 1. Tasting Functional Style in C#
Functional programming is a style of constructing the elements and structure of computer program which treats computations like evaluations in mathematical functions. Although there are some specifically designed languages for creating functional programming, such as Haskell or Scala, we can also use C# to accomplish designing functional programming.
In the first chapter of this book, we are going to explore the functional programming by testing it. We will use the power of C# to construct some functional code. We will also deal with the features in C# that are mostly used in developing functional programs. By the end of this chapter, we will have an idea of what the functional approach in C# will be like. Here are the topics we will cover in this chapter:
- Introduction to functional programming concepts
- Comparison between the functional and imperative approach
- The concepts of functional programming
- Using the mathematical approach to understand functional programming
- Refactoring imperative code to functional code
- The advantages and disadvantages of functional programming