Granular interview question

Write a function that converts between different units of measurement.