DEV Community

loading...

Discussion on: Daily Challenge #177 - Supersize Me

Collapse
craigmc08 profile image
Craig McIlwrath

Haskell:

import Data.Char (digitToInt) 
import Data.List (sortBy) 
supersize :: Int -> Int
supersize = read . sortBy (flip compare) . map digitToInt . show