DEV Community

Discussion on: Pure vs Impure Functions

nikhils4 profile image
Nikhil Singh

Great article! I would like to add that writing a pure function is more about how much control/ confidence you have on that piece of code, rather than following a bunch of rules and assuming it as a pure function. By confidence/ control, I mean how sure are you that if a certain input is any given later in time, that piece of code will give the same output.

That's how I see pure functions.