Section 12 - OOP and Functional Programming Flashcards

1
Q

Higher-order functions

A

one which either takes a function as an argument returns a function as a
result, or both. Later in this chapter, we will be looking at the higher-order functions map, filter and fold,

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

Map

A

takes a list and a function to be applied to every element in that list

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

Filter

A

takes a predicate ( a boolean condition) and a list

returns elements in the list that satisfy the boolean condition

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

fold (reduce)

A

reduces a list to a single value using recursion

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

: in lists

A

add an element in front of a list

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

++ in list

A

append something to the end of a list

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