Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

file 11 lines (10 sloc) 0.329 kb
1 2 3 4 5 6 7 8 9 10 11
name2reply :: String -> String
name2reply name =
    "Pleased to meet you, " ++ name ++ ".\n" ++
    "Your name contains " ++ charcount ++ " characters."
        where charcount = show (length name)

main :: IO ()
main = do
  putStrLn "Greetings once again. WHat is your name?"
  inpStr <- getLine
  putStrLn $ name2reply inpStr
Something went wrong with that request. Please try again.