map_values(r: record, f: fn (T) -> U) → record

Category: [records](builtinsrecords)_

Apply a function to every field value of a record, keeping the keys.

ParameterTypeDescriptionRemarks
rrecordThe record to transform.
ffn (T) -> UFunction applied to each field value.
returnsrecordA record with the same keys and transformed values.
wcl
map_values({ low: 1, high: 9 }, fn(x: i64) -> i64 { x * 2 })   // double every value, keep the keys → { high: 18, low: 2 }