Course · Section 10: A Closer Look at Functions · Lecture 137: First-Class and Higher-Order Functions
Implement `applyOp(nums, op)` that maps `nums` using the operation named by `op`: `double`, `square`, or `negate`.
+ 1 hidden test run on Submit.
A map from name to function lets you select the transform and apply it with map, the essence of higher-order design.
Run your code to see results.