Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. module Main where
  2.  
  3. import Data.Char
  4. import qualified Data.Text.Lazy as T
  5. import qualified Data.Text.Lazy.IO as X
  6.  
  7. convert :: T.Text -> T.Text
  8. convert = T.tail . T.scanl (\a b -> if isSpace a then toUpper b else b) ' '
  9.  
  10. main = do
  11.     name <- X.readFile "file"
  12.     X.putStr $ convert name