arrows pointing right and left

Haskell Cheat Sheet
Mark 1


email Scott Turner
home
programming
basics: definitions and generic expressions
name = ...
if s then x else y
(x)
types, figuring out diagnostics
name :: type
numbers (Int, Integer, Rational, Float, Double)
0, 1, -1, ...
1.0, 2.0, 1.5, 0.6666, ...
a + b
a - b
negate x
a * b
abs x
fromInteger n
m % n
a ^ n
function definitions and where (type -> type')
functionName x = ... x ...
functionName' y = ... name ... name' ...
  where {
    name = ... y ...;
    name' = ... y ... name ...
  }
strings (String)
"whatever"
s ++ t
show x
read s
lists ([type])
map f l
[m .. n]
[a,b,c]
[]
k ++ l
sentences (Bool)
False
True
a == b
a /= b
a < b
a <= b
a >= b
a > b
s && t
s || t
not s
actions (IO type)
do { a;
     b
   }
do { x <- a;
     ... x ...
   }
return x
putStrLn s
s <- getLine
sequence l

Support open standards!  
Valid XHTML 1.0!