This is the sort of technique you learn once and use a couple times, and then it’s just sort of automatic when you find yourself in this situation. Like learning a new language, the hard part is when the way you think about programming hasn’t fully made the paradigm shift.
FP’s power lies providing tools that allow you to decouple processes like “loop forever” or “transform each item of a list” from your application’s own business logic.
FP’s power lies providing tools that allow you to decouple processes like “loop forever” or “transform each item of a list” from your application’s own business logic.