Decorate-sort-undecorate idiom: Difference between revisions

Content deleted Content added
Hout (talk | contribs)
m →‎{{header|Haskell}}: Added version with hidden decoration and undecoration
Hout (talk | contribs)
m →‎{{header|Haskell}}: Added link to Haskell library source
Line 229:
=={{header|Haskell}}==
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)