Haskell — Command Reference
The most used Haskell commands — each with an explanation, working example, and real-world usage. A purely functional, strongly typed, lazily evaluated language.
7 categories · 15 commands
🖥️
Output
putStrLn, print, and do.
putStrLn / printdo (sequencing)📦
Value & Type
let binding and show/read.
let (binding)show / read🔢
Numbers & Math
Operators and mathematical functions.
Math operatorssqrt / abs / ^✍️
String
String = list of characters.
++ / lengthmap toUpper (Data.Char)isInfixOf (Data.List)📚
List
head, !!, length, ++, and map.
head / !! / lengthmap / sum / [1..n]🔀
Condition
if-then-else (expression).
if / then / elseGuards ( | )🧩
Function
Definition, type signature, and lambda.
Function definitionLambda ( \ )