11

Data Flow

In Chapter 9, Object-Oriented Programming, I suggested that the design of a functional program is more like plumbing than procedure. There is a definite data flow bias to it. This is because we tend to use map, filter, and reduce to transform the contents of lists into other lists, rather than iterating through the problem one element at a time to produce results.

We can see this bias in many of our previous examples, including the Bowling Game, Gossiping Bus Drivers, and Payroll applications in Part II, Comparative Analysis.

As another example, consider this interesting problem from day ten of Advent of Code 2022.1 The goal was ...

Get Functional Design: Principles, Patterns, and Practices 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.