parzh / xrange__core

The very core of xrange, provided as a separate package
https://npmjs.org/package/@xrange/core
0 stars 0 forks source link

Remove parameters from (future) `.return(…)` method #14

Open parzhitsky opened 2 years ago

parzhitsky commented 2 years ago

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.

parzhitsky commented 2 years ago

Blocked by #13