Chapter 7. Structuring an application with functions

This chapter covers

  • Partial application and currying
  • Getting around the limitations of method type inference
  • Thinking of dependencies on a per-function level
  • Modularizing and composing an application
  • Reducing lists to single values

Structuring a complex, real-world application is no easy task. There are entire books written on the subject, so this chapter by no means aims to provide a comprehensive view. We’ll focus on the techniques that you can use to modularize and compose an application consisting entirely of functions, and how the result compares to how this is usually done in OOP.

We’ll get there gradually. First, you’ll need to learn about a classic but fairly low-level functional ...

Get Functional Programming in C#: How to write better C# code now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.