2 ms·
What about Haskell? do putStr "What is your first name? " first <- getLine putStr "And your last name? " last <- getLine let full = first
by Y_Y 5y ago
What about Haskell?
do
putStr "What is your first name? "
first <- getLine
putStr "And your last name? "
last <- getLine
let full = first ++ " " ++ last
putStrLn ("Pleased to meet you, " ++ full ++ "!")
(see: https://en.m.wikibooks.org/wiki/Haskell/do_notation https://en.m.wikibooks.org/wiki/Haskell/do_notation )
- amusedcyclist 5y agoGets a bit uglier if you use >>= instead lol