Chapter 7. Designing data-centric programs

This chapter covers

  • Representing and processing documents
  • Designing immutable data structures
  • Converting between data representations
  • Using records and recursive discriminated unions

When designing a functional program, first think about the data that the program works with. Because nontrivial programs use data, this phase is extremely important in application design. When implementing a program in a functional language, we also begin with the data structures that we’ll use in the code, then write operations to manipulate the data as the second step.

This is different from object-oriented design, where data is encapsulated in the state of the objects; processing is expressed as methods that are ...

Get Real-World Functional Programming with Examples in F# and C# now with O’Reilly online learning.

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