|
|
|
|
|
by dllthomas
2444 days ago
|
|
Skipping over syntax, I think it's something like: 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: main = putStrLn "Hello, World"
I'm curious whether you actually think that's more useful than building understanding at the REPL. |
|
Again, I think this depends on you way of learning. For some people it might be possible to "build understanding" gradually over weeks until you are finally ready to write "hello world" having learnt all the fundamentals of the language. That just doesn't work for me. I need to learn through writing programs which actually does something.