DEV Community

loading...

Discussion on: Daily Challenge #251 - Largest Number in a Sequence

Collapse
swizzard profile image
sam
import Data.List (tails)
digit5 :: Int -> Int
digit5 = maximum 
       . map read 
       . filter ((== 5) . length) 
       . map (take 5) 
       . tails
       . show