3 ms·
In pure functional languages a function is a mathematical function: each time it is invoked with the same input, you get the same output. Imperative "functions"
by jgwil2 6y ago
In pure functional languages a function is a mathematical function: each time it is invoked with the same input, you get the same output. Imperative "functions" are really procedures, that is to say, labels for a set of instructions to be executed. There are no limitations on what those instructions might do, including IO or accessing program state, so there is no way to know whether the result of their execution will be the same from one time to the next.