Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(reverse): introduce reverse #22

Closed
wants to merge 1 commit into from

Conversation

ryoppippi
Copy link

@ryoppippi ryoppippi commented Aug 25, 2024

Hi! |'d like to add reverse function, so I implemented.
idk what is the right way to write JSDoc for this library, so please fix the docs!

Thanks as always 🍜

@lambdalisue
Copy link
Member

lambdalisue commented Aug 25, 2024

I’m sorry, but we should use [...iter].reverse() instead. Reversing requires consuming all items of the iterator, which is why there’s no difference between reverse(iter) and [...iter].reverse().

For the same reason, sort-related functions are not provided either.

@ryoppippi
Copy link
Author

ryoppippi commented Aug 25, 2024

OK, thanks. I'll use reverse() method!
Thank you for taking your time !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants