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,
2
Q
Map
A
takes a list and a function to be applied to every element in that list
3
Q
Filter
A
takes a predicate ( a boolean condition) and a list
returns elements in the list that satisfy the boolean condition
4
Q
fold (reduce)
A
reduces a list to a single value using recursion
5
Q
: in lists
A
add an element in front of a list
6
Q
++ in list
A
append something to the end of a list
7
Q
A