Expressions
What is the type of
11+2+"hello","hello" + "world"+lengthin"hello".length
Expression Sequence
What is the type of the sequence
x=2
y=3
x+yConditional Expression
What is the type of
if x>=0 then 1 else 2if x>=0 then 1 else "hello"if false then 1 else "hello"
Loops
What is the type of
while x>=0 do x=x-1
Tuples
What is the type of
(1, 2)(1, "hello")(1, 2, 3)(1, "hello", 2)
Lists
What is the type of
1 :: 2 :: Nil"hello" :: "world" :: Nil1 :: "hello" :: Nil(1 :: 2 :: Nil) :: (3 :: 4 :: Nil) :: Nil