evantianx / CodeWars-Haskell

0 stars 0 forks source link

Shortest Word #12

Open evantianx opened 5 years ago

evantianx commented 5 years ago

Description:

Simple, given a string of words, return the length of the shortest word(s).

String will never be empty and you do not need to account for different data types.

evantianx commented 5 years ago

Solutions

findShortest :: String -> Integer
findShortest = fromIntegral . minimum . map length . words