# SLR25 Functional programming paradigms Flashcards

1
Q

﻿Domain

A

“A set form which a function’s input values are chosen.”

2
Q

Co-domain

A

“A set from which the function’s output values are chosen. Not all need to be outputs.”

3
Q

First-class object

A

“Objects which may: 1) appear in expressions 2) be assigned to a variable 3) be assigned as arguments 4) be returned in function calls.”

4
Q

Function application

A

“The process of giving particular inputs to a function.”

5
Q

Partial function application

A

“The process of fixing several arguments to a function, producing another function which has a smaller number of arguments.”

6
Q

Composition of functions

A

“The process of applying one function to the results of another.”

7
Q

Higher-order functions

A

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

8
Q

Map

A

“The name of a higher-order function that applies a given function to each element of a list, returning a list of results.”

9
Q

Filter

A

“The name of a higher-order function that processes a data structure, typically a list, in some order to produce a new data structure containing exactly those elements of the original data structure that match a given condition.”

10
Q

Reduce or fold

A

“The name of a higher-order function which reduces a list of values to a single value by repeatedly applying a combining function to the list values.”

11
Q

“A set form which a function’s input values are chosen.”

A

Domain

12
Q

“A set from which the function’s output values are chosen. Not all need to be outputs.”

A

Co-domain

13
Q

“Objects which may: 1) appear in expressions 2) be assigned to a variable 3) be assigned as arguments 4) be returned in function calls.”

A

First-class object

14
Q

“The process of giving particular inputs to a function.”

A

Function application

15
Q

“The process of fixing several arguments to a function, producing another function which has a smaller number of arguments.”

A

Partial function application

16
Q

“The process of applying one function to the results of another.”

A

Composition of functions

17
Q

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

A

Higher-order functions

18
Q

“The name of a higher-order function that applies a given function to each element of a list, returning a list of results.”

A

Map

19
Q

“The name of a higher-order function that processes a data structure, typically a list, in some order to produce a new data structure containing exactly those elements of the original data structure that match a given condition.”

A

Filter

20
Q

“The name of a higher-order function which reduces a list of values to a single value by repeatedly applying a combining function to the list values.”

A

Reduce or fold