9 Building rich domains

This chapter covers

  • Working with missing values
  • Working with errors
  • Computation expressions
  • A worked example for modeling domains in F#

In the previous chapter, we more or less finished the language part of the book. There will still be a few new features scattered around, but we’ll start to look at applying those techniques in different scenarios now and looking at F# libraries (both out-of-the-box and third-party) that you should know.

This chapter builds on the previous one, which discussed discriminated unions, by focusing on two specific types that come bundled with F#: Option and Result. These are two key types that are bundled with F# and are very important to learn in order to model domains correctly and effectively. ...

Get F# in Action 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.