title: How to use map to transform a dictionary in Swift?
body: <p>I have an dictionary where I would like to transform the values of each item, but leave the original dictionary in tact. This is what I am trying to do:</p>
  
  <pre><code>var someDict = [
    "a": 1,
    "b": 2,
    "c": 3
  ]
  
  func convert(value: Int) -&gt; [String: Int] {
    return someDict.map({
        item in ????
    }
  }
  </code></pre>
  
  <p>Then I am trying to end up with this:</p>
  
  <pre><code>convert(10) // Result: ["a":10, "b":20, "c":30]
  convert(20) // Result: ["a":20, "b":40, "c":60]
  convert(5) // Result: ["a":5, "b":10, "c":15]
  someDict // Result: ["a":1, "b":2, "c":3]
  </code></pre>
  
  <p>I'm not clear from the <a href="https://developer.apple.com/library/ios/documentation/Swift/Conceptual/Swift_Programming_Language/CollectionTypes.html#//apple_ref/doc/uid/TP40014097-CH8-ID113" rel="nofollow">documentation</a> on the syntax for this or if <code>map</code> is the correct approach. Any help or suggestion would be greatly appreciated!</p>