Quantum Metric interview question

How would you change this API to support a new feature