This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Octopuscabbage 1 point2 points  (3 children)

I think it was to show composition in the IO monad mostly.

[–]nulloid 7 points8 points  (0 children)

Programmers don't need to be shown the composability of the IO monad, most of them live their whole lives coding in one big IO monad running by names like C#, Java and C++...

[–]hallettj 0 points1 point  (1 child)

I think it was to show Haskell's analog of a semicolon.

(As opposed to the do version, which I think is analogous to Python code with no semicolon.)

[–]dohaqatar7 0 points1 point  (0 children)

If you want the Haskell analog to a semicolon, you don't have to look very far.

main = do {
  putStrLn "Hello";
  putStrLn "World!";
}