November 2017
Intermediate to advanced
670 pages
17h 35m
English
We can use this insanity principle to our advantage with pure functions.
Assigning values to variables during an imperative function's execution may result in the modification of a variable in the environment in which it has run. If we run the same imperative function again, using the same input, the result may differ.
Given the results of an imperative function and given the same input, different results may be returned each time it is run. Is that not insanity?
Pure functions: