Skip to content
This repository has been archived by the owner on Mar 29, 2018. It is now read-only.

Added a sortBy method #12

Merged
merged 1 commit into from
Jun 24, 2014
Merged

Added a sortBy method #12

merged 1 commit into from
Jun 24, 2014

Conversation

ColinEberhardt
Copy link
Contributor

This is a great set of utility methods. Nice work.

This PR is for a very small addition, sortBy. I really dislike the way that the Swift Array.sort mutates the array itself. This sortBy implementation copies and sorts and as a result supports a more fluent usage:

array.sort({$0 > $1}).unique()

pNre added a commit that referenced this pull request Jun 24, 2014
@pNre pNre merged commit 643751f into pNre:master Jun 24, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants