Functional programming Flashcards

1
Q

What is a higher order function?

A

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

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

What does the map function do?

A

Applies a function to every item on the list and returns as a list

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

What does the filter function do?

A

Applies a condition to every item on the list and returns a list of items that meet the condition

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

What does the fold/reduce function do?

A

Applies a ‘combining function’ to a list continually until the list is reduced to a single value

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