Claude Pache wrote:
But I think that clarity can be improved by avoiding to obscure the intent by 
computation details. For my personal polyfill, I have found useful to abstract 
out the following steps, used (with slight variations) thrice in 
`Array.prototype.copyWithin` and twice in `Array.prototype.fill`, (and which 
can be used for various other methods of `Array.prototype`):

IndexFromRelativeIndex(`k`, `len`, `default`)

+1

Nit: How about just FromRelativeIndex for the name?

/be
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to