CS141 Functional Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

What is a programming paradigm?

A

It is a collective term to describe a group of programming languages based on a set of common properties such as programming style, how the program is evaluated and the tools made available to the programmer.

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

What is an imperative programming language

A

It is one which makes use of step by step computation.The computer follows the program like a recipe and we communicate with computer memory through the use of variables.

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

What is a pure function

A

Given the same set of inputs it produces the same set of outputs without interacting with the external world in any way (no side effects).

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

Why is haskell a purely functional and lazy language?

A

It is pure as all the definitions are pure and its lazy as it only evaluates parts of the program its needs to use for example a later expression may be evaluated before an earlier one.

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