Advanced R
Q100 / 100

What is the practical implication of R functions being "first-class objects" with respect to passing functions as arguments, e.g. "Map(function(x, y) x + y, list1, list2)"?

Correct! Well done.

Incorrect.

The correct answer is B) Functions can be assigned to variables, stored in lists, passed as arguments, and returned from other functions, enabling functional programming patterns like Map, Filter, and Reduce

B

Correct Answer

Functions can be assigned to variables, stored in lists, passed as arguments, and returned from other functions, enabling functional programming patterns like Map, Filter, and Reduce

Explanation

Because functions are first-class values in R, they can be manipulated like any other object — stored, passed around, and returned — which underlies higher-order functions such as Map(), Filter(), and Reduce().

Progress
100/100