Monday 6 June 2016

Haskell: Repeat every character in a string 5 times

Prelude> [ x|  x <- "hello", y<- [1..5]]
"hhhhheeeeellllllllllooooo"
Previous                                                 Next                                                 Home

No comments:

Post a Comment