logo

AQA A-Level Computer Science practice

What is the result of partially applying add to the integer 4?

Try the question first, then check the answer and practise the same topic again.

At a glance

MCQ

Type

practice

Style

Topic

Functional programming paradigm

Exam-style question

Try this first

What is the result of partially applying add to the integer 4?.

  1. A.An integer with the value 4
  2. B.A function of type integer → integer
  3. C.A function of type integer → (integer → integer)
  4. D.An integer with the value 8

Answer and explanation

Concise answer

A function of type integer → integer

Why this is correct

The expression add 4 returns a function which can be applied to another integer. Therefore, its type is integer → integer.

Use the concise answer above for a quick check, then reveal the full model answer and detailed explanation.

Common mistake

No common mistake is linked to this question yet.

Related flashcards

No flashcards are published for this page yet.

Related practice questions