View Problem

Add an entry to a map

Given an empty pets map, add the mapping from "rob" to "dog"
ExpandDiskEdit
ruby
pets['rob']='dog'
DiskEdit
clojure
(assoc {} 'rob 'dog)
ExpandDiskEdit
cpp C++/CLI .NET 2.0
pets->Add("rob", "dog");
ExpandDiskEdit
cpp C++/CLI .NET 2.0
pets["rob"] = "dog";

Submit a new solution for ruby, csharp, clojure, or cpp
There are 18 other solutions in additional languages (erlang, fantom, fsharp, go ...)