DEV Community

Discussion on: Daily Challenge #44 - Mexican Wave

Collapse
 
craigmc08 profile image
Craig McIlwrath • Edited
import Data.Char (toUpper, toLower) 

mexicanWave a=[[($(a!!j))(if j==i then toUpper else toLower)|j<-[0..(length a-1)]]|i<-[0..length a-1]]

One long, ugly line of haskell. (I guess 2 including the import)

Edit: missed note about skipping whitespace. Will fix it soon