3 ms·
> With that in mind, there is not much I can do in my code and have a functional app without side-effects. Not quite. Let's take one of those side effects as
by codygman 11y ago
> With that in mind, there is not much I can do in my code and have a functional app without side-effects.
Not quite. Let's take one of those side effects as an example... say accessing system state.
You probably aren't just accessing system state. You probably want to update it in some way right? Your function to update it could easily be pure.
Take obtaining user input for example. Getting the user input is usually the most boring part of the program isn't it? The majority of what you do with that user input could very likely be pure functions.