ecmascript-reverse-iterable icon indicating copy to clipboard operation
ecmascript-reverse-iterable copied to clipboard

Add comparison to other languages and standard libraries

Open domenic opened this issue 9 years ago • 2 comments

I think a valuable part of a proposal like this is to compare with how other languages and standard libraries have solved this issue. I'd be curious to see C# Enumerables, Java streams, Ruby, and Python at least.

domenic avatar Feb 24 '15 17:02 domenic

Excellent feedback. I'll do some research.

leebyron avatar Feb 24 '15 17:02 leebyron

python has the reversed function which returns a reverse_iterator. The reversed function can either take an object that has a __reversed__ method (analog to Symbol.reverseIterator) or an object that meets the "sequence protocol", e.g. in JavaScript it would have a numeric length property.

kaleb avatar Jan 22 '18 21:01 kaleb