JuliaLang/julia — pull request #9032 by nalimilan (2014-11-16 16:39:59+00:00)
Title: Simplify middle() and fix docs

The special cases gave the same result as the general rule, which is
the only intelligible one. Fix the docs and explain the rule as regards
the result type.

I'd like somebody to check this is correct as I don't understand why special cases would have been created if they weren't necessary. I'm also not sure whether the `+ zero(x)` is really needed (maybe just in case for a new type addition changes type?).

CC: @remusao about the docs