Fundamentals of functional programming Flashcards

1
Q

Co-domain

A

A set from which the function’s output values are chosen.

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

Domain

A

A set from which the function’s input values are chosen.

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

Functions

A

A rule that, for each element in some set A of inputs, assigns an output chosen from set B, but without necessarily using every member of B.

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

First-class objects

A

First-class objects (or values) are objects which may appear in expressions, be assigned to a variable, be assigned as arguments or be returned in function calls.

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

Function application

A

The process of giving particular inputs to a function.

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

Partial function application

A

A function application scheme where a function is decomposed into intermediate partial functions. A partial function takes some of the arguments and returns a function awaiting the remaining arguments.

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

Composition of functions

A

The combination of two functions to produce a new function that performs the two functions in a specified order.

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

Filter

A

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.

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

Functional programming

A

A programming paradigm where programs are constructed through the application and composition of functions.

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

Higher order functions

A

Functions which take function as an argument or return a function as result, or both.

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

Map

A

A higher-order function that applies a given function to each element of a list, returning a list of results.

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

Reduce/Fold

A

A higher-order function which reduces a list of values to a single value by repeatedly applying a combining function to the list values.

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

Append

A

Add an item to the end of a list.

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

Head-tail representation

A

A method of representing a list in two parts: a head which is the first element, and a tail which is itself a list of all the other elements.

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

Prepend

A

Add an item to the beginning of a list.

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