Exam-style question
Try this first
Explain what it means for a function to be a first-class object. Include two ways in which it may be used and identify the programming-language contexts in which this applies.
Answer and explanation
Concise answer
A function is a first-class object when it can be treated as a value in the language.
Why this is correct
A complete answer must describe the general properties of first-class objects and must connect those properties specifically to functions. It should also distinguish the two language contexts given in the specification rather than claiming that every imperative language supports first-class functions.
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.
