Part 1. Introduction

 

In chapter 1, we looked at a number of business problems that people regularly face in the industry, and we discussed how F# can help you overcome those problems. But when professional software developers look at functional-first programming for the first time, they sometimes say that it looks difficult. In the first part of the book, we’re going to look at a couple of examples that demonstrate that nothing could be further from the truth.

Functional-first programming may appear unfamiliar at first, but the ideas behind it are simple. The following two chapters demonstrate this well. In chapter 2, Kit Eason explains how to implement one mathematical task that his team faced when building a life-expectancy modeling system. You’ll see that you can often solve problems by composing a couple of functions together in an easy way. At the same time, we’ll begin diving into solid software engineering and unit testing.

Chapter 3 also doesn’t require deep understanding of F#. We’ll look at implementing a parser for the Markdown format in an extensible way. You’ll see that by following a few basic principles, you can write code that is reusable and extensible. In this chapter, you’ll learn about pattern matching in F#: one of the fundamental pieces that make it easy to express complex logic with simple code.