Functional Programming Skills
- 49Unfamiliar
- 0Learning
- 0Familiar
- 0Mastered
49 questions
- 1The functional programming skill of distinguishing among actions, calculations, and data is called_____.
Hint
Think of the skill that requires classifying what code represents.
Answer
discriminating actions, calculations, and data
- 2A computation that maps inputs to outputs and produces the same result for the same arguments is a_____.
Hint
This kind of computation does not depend on when it is run.
Answer
calculation
- 3A computation whose result can depend on when it is run is an_____.
Hint
Unlike a calculation, this category is sensitive to timing or context.
Answer
action
- 4Calculations are sometimes described as_____functions because they produce the same result for the same arguments.
Hint
The contrasting term for actions is often 'impure.'
Answer
pure
- 5Actions are sometimes described as_____functions, although actions are not always implemented as functions.
Hint
This is the opposite of 'pure.'
Answer
impure
- 6The arithmetic operator + is an example of a_____because its result is determined by its operands.
Hint
Adding the same operands gives the same result regardless of when it occurs.
Answer
calculation
- 7The increment operator ++ is an example of an_____because it changes a value.
Hint
Unlike +, this operator has a side effect on state.
Answer
action
- 8Compared with actions, calculations and data are generally easier to test and_____.
Hint
Because their behavior does not depend on when they run, they can be applied in more situations.
Answer
reuse
- 9Functional programmers generally try to keep_____lines of code in actions and move more logic into calculations.
Hint
The goal is to minimize the part of the program that depends on timing and invocation.
Answer
fewer
- 10When working with actions, it is especially important to consider how, when, and_____they are called.
Hint
The concern is not only the manner and timing of invocation but also its frequency.
Answer
how many times
- 11The functional programming skill concerned with preserving values rather than changing them in place is working with_____.
Hint
These values cannot be changed after they are created.
Answer
immutable values
- 12Because computer memory is mutable, functional programmers must deliberately rebuild the discipline of working with_____data.
Hint
The discipline concerns making records permanent rather than freely overwriting them.
Answer
immutable
- 13Immutability may be implemented by a programming team, a programming language, or a_____.
Hint
This is another system that can enforce how information is stored and changed.
Answer
database
- 14Working with immutable data usually involves making many_____rather than overwriting existing values.
Hint
The original structure remains unchanged, so a new version must be constructed.
Answer
copies
- 15Changing a value deep inside an immutable nested structure requires deciding which parts of the entire_____must be copied.
Hint
Nested data is described as a hierarchical structure.
Answer
tree
- 16In the example of giving employees a raise, the company, employees, and salaries are all treated as_____values.
Hint
None of these entities is changed directly; updated versions are created.
Answer
immutable
- 17A functional programmer must learn to handle immutable data even though software systems often use memory that can_____.
Hint
This is the fundamental property that contrasts with immutability.
Answer
change
- 18The third major skill combines using and creating higher-order_____and actions.
Hint
The missing term is the other major category paired with actions.
Answer
calculations
- 19A calculation or action is higher-order when it can be treated like any other_____.
Hint
It can be passed, returned, or stored in the same way as ordinary data.
Answer
value
- 20A higher-order calculation or action can be passed to a function as an_____.
Hint
This is what a function receives when it is called.
Answer
argument
- 21A higher-order function can produce behavior by_____a calculation or action from the function.
Hint
The function can give another function back to its caller.
Answer
returning
- 22Higher-order calculations and actions can also be stored in a_____.
Hint
This is a named location used to hold a value.
Answer
variable
- 23Passing behavior to another function is possible because functional programming supports_____functions.
Hint
These functions can be handled like ordinary values.
Answer
first-class
- 24A higher-order operation could automatically make an action_____by controlling how it is invoked.
Hint
An idempotent operation can be repeated without changing the result beyond the first application.
Answer
idempotent
- 25A higher-order operation could automatically retry a failing action_____times.
Hint
The example specifies a particular small number of retries.
Answer
three
- 26The reusable definition of behavior such as retrying actions prevents repeated_____code from being written in many places.
Hint
This term refers to repetitive code needed for routine behavior.
Answer
boilerplate
- 27The higher-order functions_____
map,filter, andreducecan be combined to build data transformation.Hint
Think of a sequence in which the output of one transformation flows into the next.
Answer
pipelines
- 28In a classic functional programming exercise, a function receives an unknown function F and returns a new function that calculates the_____of F.
Hint
The result describes the rate of change of the input mathematical function.
Answer
derivative
- 29Data modeling is the process of structuring measurements and facts about the world into concrete_____in code.
Hint
The goal is to represent information in an organized form that software can use.
Answer
structures
- 30The central goal of data modeling is to structure data so it can be used_____.
Hint
A good model supports practical use by the software.
Answer
effectively
- 31Data that must leave a library or server as part of its API is_____data.
Hint
This data is exposed to developers or users outside the component.
Answer
public-facing
- 32Public-facing API data needs to be_____so that developers on the other side can understand it.
Hint
The format should be understandable by people, not merely efficient for machines.
Answer
human-readable
- 33Data modeling used inside a system to make a search through a space efficient is called_____data modeling.
Hint
This kind of model is not exposed as part of the public API.
Answer
internal
- 34Internal data models may prioritize efficient searching and ensuring that all the required_____is available.
Hint
The model must contain what the search process needs to operate.
Answer
data
- 35The fifth major functional programming skill concerns_____skills used to organize growing software systems.
Hint
This skill prevents a large codebase from becoming unmanageable.
Answer
architecture
- 36A reactive architecture is based on events being generated, consumed, and used to produce a_____of the world.
Hint
This is the system's current representation of what is happening.
Answer
view
- 37In reactive architecture, the derived view of the world may be projected onto a_____.
Hint
This is the graphical interface presented to users.
Answer
GUI
- 38Reactive architectures commonly modify a centralized piece of_____and derive a new projection from it.
Hint
This represents the system's current information.
Answer
state
- 39The reactive architecture cycle is driven by reactions to changes in the_____.
Hint
The cycle responds when the system's information changes.
Answer
data
- 40The Onion Architecture has three main layers: the interaction layer, the business rule layer, and the_____layer.
Hint
This innermost layer contains the domain model.
Answer
domain
- 41In the Onion Architecture, the outermost layer is the_____layer.
Hint
This layer communicates with the outside world.
Answer
interaction
- 42The interaction layer contains the system's_____because it communicates with the outside world.
Hint
These are the parts of the system sensitive to external events and timing.
Answer
actions
- 43The second Onion Architecture layer is the business rule layer, which contains_____rather than actions.
Hint
This layer expresses business logic without directly communicating with the outside world.
Answer
calculations
- 44Rules such as vacation policies and payroll calculations belong in the_____rule layer.
Hint
These rules describe changing requirements of an organization.
Answer
business
- 45The innermost Onion Architecture layer contains the timeless_____model.
Hint
It represents enduring concepts about the problem area.
Answer
domain
- 46The fact that employees receive salaries and vacation is treated as part of the timeless_____model, while the amount is a business rule.
Hint
The missing term names the innermost Onion Architecture layer.
Answer
domain
- 47In the Onion Architecture, the interaction layer changes most rapidly because external APIs and their_____can change frequently.
Hint
An API may require code changes when a new release alters how it is accessed.
Answer
versions
- 48Business rules generally change less rapidly than the interaction layer, while the domain model changes the_____frequently.
Hint
The innermost layer contains the most timeless concepts.
Answer
least
- 49The Onion Architecture separates rapidly changing interaction concerns from relatively stable_____concerns.
Hint
These concerns represent enduring facts about the problem area.
Answer
domain

Ask anything
We've read this whole study set, so questions about it get the best answers.