Getting Started Flashcards

1
Q

Explain side effect in a function

A

Haskell functions have no side effects.

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

Describe variables in Haskell

A

cannot change the value of a variable later in the program. If variable ‘a’ is set to 5, it remains so throughout the funciton

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

Describe Referential Tarnsparency

A

If a function yields the same result, given the same inputs irrespective of the number of times it has been called - is called referential transparency.

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

Describe Lazy Evaluation in Programming Langauages

A

expressions and functions are evaluated only when needed.This also avoids repeated evaluations thereby increasing performance

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