Introduction to Haskell
First step into Haskell, a purely functional language: main, printing with putStrLn, and the do block.
Simple enough for a 5-year-old to understand
print with putStrLn
Programs start from main. putStrLn prints text and moves to a new line.
main = putStrLn "Hello!"Multiple lines: do
A do block is used to perform multiple operations in sequence.
main = do putStrLn "First" putStrLn "Second"🎯 Exercise & Practice
Test what you've learned — answer, write code, check instantly. (1 left)
🎯 Expected output: Hello World