What is a higher-order function?
a) A function that returns the maximum value
b) A function that takes another function as an argument or returns a function
c) A function that runs indefinitely
d) A function that uses global variables
Answer:
b) A function that takes another function as an argument or returns a function
Explanation:
A higher-order function is one that can take other functions as arguments or return them as results, which allows for more abstract and flexible code in functional programming.