logo

Question detail

If add 4 returns a function that adds 4 to its argument, what is the result of applying that returned function to 7?

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

At a glance

MCQ

Type

practice

Style

Topic

Functional programming paradigm

Exam-style question

Try this first

If add 4 returns a function that adds 4 to its argument, what is the result of applying that returned function to 7?.

  1. A.3
  2. B.4
  3. C.7
  4. D.11

Model answer

What a good answer should say

  • 11

Explanation

Why this works

The first argument fixes the value 4. Applying the resulting function to 7 calculates 4 + 7, giving 11.

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.