mapValues({ a: 1, b: 2 }, v => v * 10) // β { a: 10, b: 20 }mapValues<T, U> transforms every value in a Record, preserving keys and type-checking the result.
Challenge: Implement mapValues<T, U>(obj: Record<string, T>, fn: (v: T) => U): Record<string, U> transforming every value.
mapValues({ a: 1, b: 2 }, x => x * 2) // β { a: 2, b: 4 }
mapValues({ x: 'hi' }, s => s.length) // β { x: 2 }