We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 66d8fab commit 90da499Copy full SHA for 90da499
containers/src/Data/Sequence/Internal/sorting.md
@@ -137,7 +137,7 @@ [email protected], 1/11/18
137
The `sortOn` and `unstableSortOn` functions perform the Schwartzian transform, however instead of the following implementation:
138
139
```haskell
140
-sortOn f = fmap snd . sortBy (conparing fst) . fmap (\x -> (f x, x))
+sortOn f = fmap snd . sortBy (comparing fst) . fmap (\x -> (f x, x))
141
```
142
143
The `fmap`s are fused manually with the creation of the queue, avoiding the two extra traversals. It still suffers a slowdown of roughly 20%:
0 commit comments