Flashcards
4.12
Flashcards do conjunto (11)
- 1Function: f: A -> BA is domain (set of inputs) B is codomain (set of outputs)
- 2First class objectsObjects which may:
-appear in expressions
-be assigned to a variable
-be returned in function calls - 3Function applicationthe process of giving particular inputs to a function
- 4Partial function applicationThe application of a function to an argument, resulting in a function that is applied to the next argument
- 5Composition of functionsThe combination of 2 functions to create another. Function fg(x). g is completed first, then f is ran with the outputs of g.
- 6Higher order functionTakes a function as an argument or returns a function
- 7MapTakes a function and a list as its arguments
Applies the function to each item in the list recursively
Returns the new list [] - 8FilterTakes a function with a {True, False} co domain and a list as its arguments
Applies the function recursively to each item in the list, returning true or false.
A list containing all the values which returned true is returned [] - 9FoldTakes a combining function and a list as its arguments
Recursively applies itself to the head of a list. Reduces the list of values to a single value by applying a combining function. - 10RecursionThe act of a function calling itself, must include a case that breaks the recursion
- 11Prepend and appendPrepend - Add a value to the start of a list
Append - Add a value to the end of a list
Informações
- Descrição
- FlashCards sobre 4.12, criado por James John em 29-04-2022.
- Criado por
- James John
- Visualizações
- 0
- Avaliação