|
|
|
|
|
by goto11
2444 days ago
|
|
Sure, but Learn You a Haskell seem to try to avoid saying "I will explain this mumbo jumbo later" by explaining everything up to type classes before getting to "hello world". I guess I should write a Haskell tutorial which starts with "hello world" without trying to teach monads beforehand! |
|
To write any program in Haskell, you define `main`, the IO action that does the work of your program. `putStrLn` is a function that takes a String and returns an IO action that prints the string.
So we can write "hello world" simply:
I'm curious whether you actually think that's more useful than building understanding at the REPL.