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

Plain Sort for ordered types #29

Closed
clipperhouse opened this issue Jan 25, 2014 · 1 comment
Closed

Plain Sort for ordered types #29

clipperhouse opened this issue Jan 25, 2014 · 1 comment

Comments

@clipperhouse
Copy link
Owner

Currently (on the projection branch), we have a standard method for SortBy, which takes a func to define less.

Many types can simply be evaluated as greater or less (‘ordered’ in Go’s terminology). Create a Sort method, which does not require a passed func, for types that pass the test of being ordered.

This will not require the big re-implemented Sort template; rather just satisfy the sort package’s Interface for these types, and wrap in a simple method that returns a sorted copy (instead of sorting in place).

@clipperhouse
Copy link
Owner Author

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

1 participant