mapValues(_:)
Returns a new dictionary containing the keys of this dictionary with the values transformed by the given closure.
Declaration
func mapValues<T, E>(_ transform: (Value) throws(E) -> T) throws(E) -> Dictionary<Key, T> where E : ErrorParameters
- transform:
A closure that transforms a value.
transformaccepts each value of the dictionary as its parameter and returns a transformed value of the same or of a different type.
Return Value
A dictionary containing the keys and transformed values of this dictionary.