Skip to content

Add '-sort-keyed'.#166

Open
doublep wants to merge 1 commit intomagnars:masterfrom
doublep:sort-keyed
Open

Add '-sort-keyed'.#166
doublep wants to merge 1 commit intomagnars:masterfrom
doublep:sort-keyed

Conversation

@doublep
Copy link
Copy Markdown
Contributor

@doublep doublep commented Oct 6, 2015

issue #156

Comment thread dash.el
COMPARATOR is called with two keys, and should return non-nil if
the first one (and thus its associated LIST element) should sort
before the second."
(if (cdr list)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this really necessary? Map and sort on empty list returns nil, so that's not a problem, and while calling it on a list with length one is pointless, the performance hit is so negigible it is not worth the extra complexity.

@Fuco1
Copy link
Copy Markdown
Collaborator

Fuco1 commented May 1, 2016

I think we should rename this to -sort-on so that it is a composition of -sort and -on, that would make it more clear I think.

@Fuco1
Copy link
Copy Markdown
Collaborator

Fuco1 commented Sep 14, 2016

Dash now uses lexical binding so it should be safe. How are you on time? Do you want to finish this? :)

@Fuco1 Fuco1 modified the milestone: 2.14.0 Nov 9, 2016
@Fuco1 Fuco1 self-assigned this Feb 19, 2019
@basil-conto basil-conto added the enhancement Suggestion to improve or extend existing behavior label Feb 15, 2021
@basil-conto basil-conto modified the milestones: 2.16.0, 2.19.0 Feb 15, 2021
@basil-conto basil-conto linked an issue Feb 15, 2021 that may be closed by this pull request
@basil-conto basil-conto modified the milestones: 2.19.0, 2.20.0 Jun 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Suggestion to improve or extend existing behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

FR: -sort-keyed

3 participants