Skip to content

Commit

Permalink
sorting.extras: faster map-sort.
Browse files Browse the repository at this point in the history
  • Loading branch information
mrjbq7 committed Dec 5, 2014
1 parent e7bb1a4 commit 17de36d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion extra/sorting/extras/extras.factor
Expand Up @@ -8,7 +8,7 @@ IN: sorting.extras
sort [ second-unsafe ] map! ; inline

: map-sort ( ... seq quot: ( ... elt -- ... key ) -- ... sortedseq )
[ map ] curry keep zip
[ keep ] curry { } map>assoc
[ { array } declare first-unsafe ] sort-with
[ { array } declare second-unsafe ] map ; inline

Expand Down

0 comments on commit 17de36d

Please sign in to comment.