Functions are the basic building blocks in functional computer programming. In strongly typed functional programming, every function has a well-defined input type and output type. In this chapter, we'll discuss how to build simple F# programs using strongly typed functions.
Of all the strongly typed functional languages, I chose F# for this book because it's fairly popular, open source, and cross-platform. Other similar languages include Haskell, OCaml, and Scala, and even more mainstream languages like C# and TypeScript support strongly typed functional programming to varying degrees. You should be able to work through the exercises in this book with any of these languages (or others, if you're ambitious). However, all the examples are written in F#, so you'll at least need to be able to read it.
The first step, if you haven't already done so, is to install F# on your computer and make sure you can run code. Appendix the appendix has instructions to help you get set up. These first few chapters are designed to introduce you to functional programming and to get you up to speed with the F# language so you can read it and use it confidently throughout the rest of the book. We also provide a more in-depth reference online at ???????. Now let's get started with the most important concept: the function.