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

Missing method: sort #8

Open
matepaiva opened this issue Oct 6, 2018 · 2 comments
Open

Missing method: sort #8

matepaiva opened this issue Oct 6, 2018 · 2 comments

Comments

@matepaiva
Copy link

Just a suggestion for a method that could be implemented with this lib, once it would be useful to me: sort.

If you like the suggestion, I could work on it (with your help, of course).

@RubenMateus
Copy link
Collaborator

Yeah of course. In c# linq it's called orderBy.

@sj-freitas
Copy link
Owner

sj-freitas commented Oct 10, 2018

A sort function is a good feature, however a purely lazy sort would defeat the purpose of being lazy, since a sort requires at least one cycle through all elements, materializing them. If they aren't cached, the performance can be much much worse than eager algorithms. However an inferred sort would be an interesting feature, having the sort only be executed when the iterator is materialized.

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

No branches or pull requests

3 participants