The thing with pure functional programming is .. you can't have variables (persisted inner state). You can only chain function calls. You're not allowed to check a result twice.
Checking early doesn't make it more functional. But you are right, checking/returning early helps to prevent side effects and makes the code more clear.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
The thing with pure functional programming is .. you can't have variables (persisted inner state). You can only chain function calls. You're not allowed to check a result twice.
Checking early doesn't make it more functional. But you are right, checking/returning early helps to prevent side effects and makes the code more clear.