If you want to write code like a functional programmer, you need to follow these basic rules:
: In FP, functions are treated like any other variable. You can pass them as arguments to other functions or return them as results. Functional Programming For Dummies
: Once you create a piece of data, you never change it. If you need a modified version, you create a whole new copy with the changes. If you want to write code like a
While it can be a challenging mindset shift, FP offers several major benefits: Fundamentals of functional programming | by Jonas Neumann Functional Programming For Dummies