Lesson 24. Capstone 4

It’s back to bank accounts again! This time you’re going to apply the lessons you learned on domain modeling into the bank account system. In this exercise, you’ll do the following:

  • Use options in practical situations
  • Use discriminated unions to accurately model a closed set of cases
  • Work with collections with more-complex data
  • Enforce business rules through the type system

24.1. Defining the problem

When you completed lesson 19, you had a version of a working bank account application that could handle persistence to disk and back again, as well as remove mutation for your command handler. Now you’re going to remove some of the “code smells” that have been left lying around by introducing some lovely F# domain modeling. ...

Get Get Programming with F# 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.