Mixing OOP and FP

So far, we have seen that adding FP capabilities to an OOP language leads to benefits in the OOP design.

In summary, OOP fits perfectly with FP when our objects are as immutable as possible. To make our objects as immutable as possible, we can consider the following principles:

These principles not only empower us to employ functional design patterns, but also enrich our object-oriented code.