putStrLn / print
Printing to the screen.
Syntax
putStrLn text // print value
Description
putStrLn writes a String and moves to the next line. print writes any value (number, items) (using show). main is the entry point of the program.
Example
Loading editor…
Expected output
Hello 42
When to use?
Showing results, debugging.
Common mistakes
- ⚠️ putStrLn only takes a String; use print or show for numbers.