Jump to content

Decorate-sort-undecorate idiom: Difference between revisions

m
→‎{{header|Haskell}}: Added link to Haskell library source
m (→‎{{header|Haskell}}: Added version with hidden decoration and undecoration)
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)
 
9,659

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.