Following statement
converts every character in string to uppercase.
getUpper list =
[toUpper x | x <- list ]
Prelude> import Data.Char Prelude Data.Char> Prelude Data.Char> let getUpper list = [toUpper x | x <- list ] Prelude Data.Char> Prelude Data.Char> getUpper "Hello ptr, How are you" "HELLO PTR, HOW ARE YOU"
No comments:
Post a Comment