Exam-style question
Try this first
What is the result of partially applying add to the integer 4?.
- A.An integer with the value 4
- B.A function of type integer → integer
- C.A function of type integer → (integer → integer)
- 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.
