The code was probably converted from using `arguments` (which needs `Array.prototype.slice`) to using `...rest` params, and they just overlooked updating this line. The line above it also has a bug: it should be `xs.slice(-1)[0]`.