3 ms·
True, do notation does require you to add a line - main = do print "Enter name:" name <- getLine print ("Hello " ++ name ++ "!") But I onl
by nightski 7y ago
True, do notation does require you to add a line -
main = do
print "Enter name:"
name <- getLine
print ("Hello " ++ name ++ "!")
But I only said that it makes this convenient not that it allowed you to write any statement you want. It still makes it easy to intersperse pure and non-pure code.