Open
Description
In the Purely Relative section of Chapter 5 you define a function called median
to use in an example, but it doesn't actually find the median: it's just returning the average of the first and last values in the array. (Which just coincidentally is also the median in the specific array used in the example.)
Actually defining median inline might be a bit too complicated (as the purpose of the function in the example is just to illustrate the side effects of modifying the array referenced by the closure) so maybe the function should just be renamed? Or alternatively it could be changed to calculate the mean, since that would give the same output in the example, and is simple to define?