DEV Community

loading...

Discussion on: Daily Challenge #15 - Stop gninnipS My sdroW!

Collapse
craigmc08 profile image
Craig McIlwrath

Haskell:

flipWords :: String -> String
flipWords = unwords . map (\w -> if length w > 4 then reverse w else w) . words