Functional programming is not about "no side effects", but how to separate pure functions and side effects. Additionally FP is also about how to separate data and logic.