1 Introducing functional programming

This chapter covers

  • Benefits and tenets of functional programming
  • Functional features of the C# language
  • Using records and pattern matching for type-driven programs

Functional programming (FP) is a programming paradigm: a different way of thinking about programs than the mainstream imperative paradigm you’re probably used to. For this reason, learning to think functionally is challenging but also very enriching. My ambition is that, after reading this book, you’ll never look at code with the same eyes as before!

The learning process can be a bumpy ride. You’re likely to go from frustration at concepts that seem obscure or useless to exhilaration when something clicks in your mind, and you’re able to replace ...

Get Functional Programming in C#, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.