3 ms·
I think mutable variables (inside functions) are just fine, as long as the function itself always returns the same result for the same arguments. That is the e
by galaxyLogic 3y ago
I think mutable variables (inside functions) are just fine, as long as the function itself always returns the same result for the same arguments. That is the essence of "pure" I think.
A function should be a "black box". I don't care what happens inside it as long its externally observable behavior is pure.