HASKELL Flashcards

(15 cards)

1
Q

It is the keyword used to define a function in Haskell.

A

let

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

It is the operator used to concatenate two lists.

Haskell

A

++

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

It is the type that represents whole numbers (positive and negative, no decimals).

Haskell

A

Int

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

It is the symbol used to define a function’s type signature.

Haskell

A

::

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

It is the keyword used to define local bindings inside a function.

Haskell

A

let (or where)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Haskell is a functional programming language.

True/False

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

In Haskell, variable values can be changed after they are defined.

True/False

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

The expression 5 + 3 will return 8 in Haskell.

True/False

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Lists in Haskell must contain elements of the same type.

True/False

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

The function head returns the last element of a list.

True/False

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q
x = 10
y = 5
x + y
A

15

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q
double n = n * 2
double 4
A

8

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q
numbers = [1,2,3]
length numbers
A

3

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q
add a b = a + b
add 3 7
A

10

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q
list = [10,20,30]
head list
A

10

How well did you know this?
1
Not at all
2
3
4
5
Perfectly