logo

Question detail

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

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

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

Model answer

What a good answer should say

  • A function of type integer → integer

Explanation

Why this works

The expression add 4 returns a function which can be applied to another integer. Therefore, its type is 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.