I was curious what side-effect-free function means, and found a link that describes this well:
https://dzone.com/articles/side-effects-1
"We consider that a function has a side effect if it modifies a mutable data structure or variable, uses IO, throws an exception or halts an error; all of these things are considered side effects... if you had them, a function can be unpredictable depending on the state of the system... "
haiyuem
@mhchin Thanks for the information, that was useful! My understanding of side-effect-free functions is that they don't depend on or change the state of the system.
I was curious what side-effect-free function means, and found a link that describes this well: https://dzone.com/articles/side-effects-1
"We consider that a function has a side effect if it modifies a mutable data structure or variable, uses IO, throws an exception or halts an error; all of these things are considered side effects... if you had them, a function can be unpredictable depending on the state of the system... "