logo

Question detail

Using add(3,4) as an example, explain what function application is and why the function can be described as taking one argument even though two integer values are shown.

Try the question, check the answer, then read the explanation to understand the curriculum point.

At a glance

Question

Type

practice

Style

Topic

Functional programming paradigm

Exam-style question

Try this first

Using add(3,4) as an example, explain what function application is and why the function can be described as taking one argument even though two integer values are shown.

Model answer

What a good answer should say

  • Function application is the process of giving particular inputs to a function.
  • In add(3,4), the function add is applied to the integer values 3 and 4.
  • Although this is commonly described as giving two arguments, the function is regarded as taking one argument: the pair (3,4).
  • This pair belongs to integer x integer, and the function produces an integer result.

Explanation

Why this works

The answer must define function application, identify 3 and 4 as the particular integer inputs, and explain that they are treated together as one pair. It should also connect the example to the type integer x integer → integer.

Common mistake

No common mistake is linked to this question yet.

Related flashcards

No flashcards are published for this page yet.

Related practice questions

No questions are published for this page yet.