Hacker News new | past | comments | ask | show | jobs | submit login

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.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: