Writing Functional programs Flashcards
1
Q
What is a map function?
A
The map function applies a given function to each of the elements in a list to form another list with results in the same order
2
Q
What is a filter function?
A
Filter function is a higher-order function that processes a list or data structure to create a new list containing elements that match the specified criteria
3
Q
What is a reduce/fold function?
A
Reduce or fold function is a method that can be used to reduce a list to a single value by combining the list using recursive function.