Thomas Hartman wrote:
To answer my own post, the Data.List.sort *is* necessary.
Otherwise, you get alphabetic sort.
Which is why you do the Set trick at a different stage in the process,
like this:
interact $
unlines
. map show
-- more efficient than -- reverse . take 10 . reverse
. ( \s -> drop (length s - 10 ) s )
. Data.Set.toAscList . Data.Set.fromList -- move it *here* after
integer conversion and it sorts and nubs for you
. map ( read :: String -> Integer )
. filter ( all Data.Char.isDigit ) . lines'
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe