SLR25 Functional programming paradigms Flashcards

1
Q

Domain

A

“A set form which a function’s input values are chosen.”

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

Co-domain

A

“A set from which the function’s output values are chosen. Not all need to be outputs.”

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

First-class object

A

“Objects which may: 1) appear in expressions 2) be assigned to a variable 3) be assigned as arguments 4) be returned in function calls.”

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

Function application

A

“The process of giving particular inputs to a function.”

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

Partial function application

A

“The process of fixing several arguments to a function, producing another function which has a smaller number of arguments.”

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

Composition of functions

A

“The process of applying one function to the results of another.”

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

Higher-order functions

A

“A function that takes a function as an argument, returns a function as a result or does both.”

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

Map

A

“The name of a higher-order function that applies a given function to each element of a list, returning a list of results.”

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

Filter

A

“The name of a higher-order function that processes a data structure, typically a list, in some order to produce a new data structure containing exactly those elements of the original data structure that match a given condition.”

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

Reduce or fold

A

“The name of a higher-order function which reduces a list of values to a single value by repeatedly applying a combining function to the list values.”

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

“A set form which a function’s input values are chosen.”

A

Domain

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

“A set from which the function’s output values are chosen. Not all need to be outputs.”

A

Co-domain

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

“Objects which may: 1) appear in expressions 2) be assigned to a variable 3) be assigned as arguments 4) be returned in function calls.”

A

First-class object

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

“The process of giving particular inputs to a function.”

A

Function application

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

“The process of fixing several arguments to a function, producing another function which has a smaller number of arguments.”

A

Partial function application

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

“The process of applying one function to the results of another.”

A

Composition of functions

17
Q

“A function that takes a function as an argument, returns a function as a result or does both.”

A

Higher-order functions

18
Q

“The name of a higher-order function that applies a given function to each element of a list, returning a list of results.”

A

Map

19
Q

“The name of a higher-order function that processes a data structure, typically a list, in some order to produce a new data structure containing exactly those elements of the original data structure that match a given condition.”

A

Filter

20
Q

“The name of a higher-order function which reduces a list of values to a single value by repeatedly applying a combining function to the list values.”

A

Reduce or fold