Decorate-sort-undecorate idiom: Difference between revisions
Content added Content deleted
m (→{{header|Haskell}}: Added version with hidden decoration and undecoration) |
m (→{{header|Haskell}}: Added link to Haskell library source) |
||
Line 229: | Line 229: | ||
=={{header|Haskell}}== |
=={{header|Haskell}}== |
||
Haskell's standard sortOn is an implementation of this idiom. |
Haskell's standard sortOn is an implementation of this idiom. |
||
The source can be inspected at:<br> |
|||
https://hackage.haskell.org/package/base-4.18.0.0/docs/src/Data.OldList.html#sortOn |
|||
<syntaxhighlight lang="haskell">import Data.List (sortOn) |
<syntaxhighlight lang="haskell">import Data.List (sortOn) |
||