Exam-style question
Try this first
Which description best matches a higher-order function?.
- A.A function that always returns a number
- B.A function that takes a function as an argument or returns a function as a result
- C.A function that contains no repetition
- D.A function that can only process lists of strings
Answer and explanation
Concise answer
A function that takes a function as an argument or returns a function as a result
Why this is correct
The specification defines a higher-order function as one that takes a function as an argument, returns a function as a result, or does both.
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.
