3 ms·
It doesn't matter how many arguments there are. My point was that calling the function will mutate one of its arguments and in fact, in the example the returned
by sjclemmy 10y ago
It doesn't matter how many arguments there are.
My point was that calling the function will mutate one of its arguments and in fact, in the example the returned value of the function is irrelevant because nothing is assigned to the return value of the function when it is invoked. So it's actually just plain wrong. The function is called and a side effect of calling the function is the mutation of the supplied 'result' argument. Call the function 4 times and you get a different result every time. Not a pure function.