Chapter 2 in Learn You a Haskell ....
Int
, Integer
, Float
,
Double
, Bool
, Char
+
, -
,*
, /
,
<
, <=
, etc.r^2
is
r2Integer
is an unbounded integer (can be as big
as you want)True False
&& ||
not
== /=
'a'
[1, 2, 3]
1 : [2, 3]
"hello"
is short-hand for ['h', 'e',
'l', 'l', 'o']
[1, 2 .. 5] [1, 2 .. ] [ n * n * n | n <- [1 .. 10]
++
, !!
, length
,
head
,
tail
,
reverse
, zip
[ ("COMP230", "Computer Organization", 27),
("COMP320", "Programming Languages", 23) ]