Created
October 30, 2009 02:51
-
-
Save diegoeche/222068 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Control.Arrow | |
import Data.List | |
import Data.Ord | |
articles = ["Crimen y castigo", | |
"Humillados y ofendidos", | |
"Fin de la Eternidad", | |
"Siberiada"] | |
matches x = length | |
sortArticles x = map snd | |
. sortBy (comparing fst) | |
. map (matches x &&& id) $ articles | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment