> I would really like to see something like the following added to the standard 
> library:
> 
> extension Dictionary {
>     
>     func mapValues<U>(transform:(Key,Value)->U)->[Key:U] {
>         var output:[Key:U] = [:]
>         for (k,v) in self {
>             output[k] = transform(k,v)
>         }
>         return output
>     }
>     
> }

+1 from me, and +78 from people on Stack Overflow: 
<http://stackoverflow.com/a/24219069/41222>

-- 
Brent Royal-Gordon
Architechies

_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to