logo

Question detail

Which description best matches a higher-order function?

Try the question, check the answer, then read the explanation to understand the curriculum point.

At a glance

MCQ

Type

practice

Style

Topic

Writing functional programs

Exam-style question

Try this first

Which description best matches a higher-order function?.

  1. A.A function that always returns a number
  2. B.A function that takes a function as an argument or returns a function as a result
  3. C.A function that contains no repetition
  4. D.A function that can only process lists of strings

Model answer

What a good answer should say

  • A function that takes a function as an argument or returns a function as a result.

Explanation

Why this works

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.

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.