Bug in in-place example code.

There is a bug in the in-place code example here.

Line 15 currently reads:

result[i] *= result[i]

It should be this instead:

array[i] *= array[i]

Since the passed in array is named array, and we are performing in-place operations on this array, we need to reference array.

Comments (1)