Protocol-compliant implementation assumes .return(…) method having a parameter, that's basically passed through as the return value of the method's call. Since xrange is a number iterator, it is designed to return "nothing" (i.e., undefined) after the iterated range is finished (the current NaN is temporary as per parzh/xrange#50), which means that the returned value of .return(…) is always an implicit undefined, and it doesn't depend on any inputs.
Protocol-compliant implementation assumes
.return(…)
method having a parameter, that's basically passed through as the return value of the method's call. Sincexrange
is a number iterator, it is designed to return "nothing" (i.e.,undefined
) after the iterated range is finished (the currentNaN
is temporary as per parzh/xrange#50), which means that the returned value of.return(…)
is always an implicitundefined
, and it doesn't depend on any inputs.