1. Home
  2. Explore
  3. Computer Science
  4. Functional Programming Skills

Study methods

Flashcards
Quiz
Fill in the blanks
Written test
Lesson
Notes
Podcast
Content

Functional Programming Skills

  • 49Unfamiliar
  • 0Learning
  • 0Familiar
  • 0Mastered
Topic: Core Distinctions
The functional programming skill of distinguishing among actions, calculations, and data is called
.

49 questions

  1. 1
    The 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

  2. 2
    A 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

  3. 3
    A 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

  4. 4
    Calculations 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

  5. 5
    Actions are sometimes described as
    _____
    functions, although actions are not always implemented as functions.
    Hint

    This is the opposite of 'pure.'

    Answer

    impure

  6. 6
    The 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

  7. 7
    The increment operator ++++++ is an example of an
    _____
    because it changes a value.
    Hint

    Unlike +++, this operator has a side effect on state.

    Answer

    action

  8. 8
    Compared 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

  9. 9
    Functional 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

  10. 10
    When 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

  11. 11
    The 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

  12. 12
    Because 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

  13. 13
    Immutability 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

  14. 14
    Working 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

  15. 15
    Changing 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

  16. 16
    In 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

  17. 17
    A 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

  18. 18
    The 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

  19. 19
    A 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

  20. 20
    A 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

  21. 21
    A 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

  22. 22
    Higher-order calculations and actions can also be stored in a
    _____
    .
    Hint

    This is a named location used to hold a value.

    Answer

    variable

  23. 23
    Passing behavior to another function is possible because functional programming supports
    _____
    functions.
    Hint

    These functions can be handled like ordinary values.

    Answer

    first-class

  24. 24
    A 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

  25. 25
    A higher-order operation could automatically retry a failing action
    _____
    times.
    Hint

    The example specifies a particular small number of retries.

    Answer

    three

  26. 26
    The 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

  27. 27
    The higher-order functions map, filter, and reduce can be combined to build data transformation
    _____
    .
    Hint

    Think of a sequence in which the output of one transformation flows into the next.

    Answer

    pipelines

  28. 28
    In a classic functional programming exercise, a function receives an unknown function FFF and returns a new function that calculates the
    _____
    of FFF.
    Hint

    The result describes the rate of change of the input mathematical function.

    Answer

    derivative

  29. 29
    Data 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

  30. 30
    The 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

  31. 31
    Data 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

  32. 32
    Public-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

  33. 33
    Data 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

  34. 34
    Internal 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

  35. 35
    The 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

  36. 36
    A 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

  37. 37
    In reactive architecture, the derived view of the world may be projected onto a
    _____
    .
    Hint

    This is the graphical interface presented to users.

    Answer

    GUI

  38. 38
    Reactive architectures commonly modify a centralized piece of
    _____
    and derive a new projection from it.
    Hint

    This represents the system's current information.

    Answer

    state

  39. 39
    The reactive architecture cycle is driven by reactions to changes in the
    _____
    .
    Hint

    The cycle responds when the system's information changes.

    Answer

    data

  40. 40
    The 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

  41. 41
    In the Onion Architecture, the outermost layer is the
    _____
    layer.
    Hint

    This layer communicates with the outside world.

    Answer

    interaction

  42. 42
    The 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

  43. 43
    The 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

  44. 44
    Rules such as vacation policies and payroll calculations belong in the
    _____
    rule layer.
    Hint

    These rules describe changing requirements of an organization.

    Answer

    business

  45. 45
    The innermost Onion Architecture layer contains the timeless
    _____
    model.
    Hint

    It represents enduring concepts about the problem area.

    Answer

    domain

  46. 46
    The 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

  47. 47
    In 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

  48. 48
    Business 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

  49. 49
    The Onion Architecture separates rapidly changing interaction concerns from relatively stable
    _____
    concerns.
    Hint

    These concerns represent enduring facts about the problem area.

    Answer

    domain

1 of 49
Question 1 of 49

Ask anything

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

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent