View Problem

Define an empty map

DiskEdit
ruby
map = []
ExpandDiskEdit
java
Map map = new HashMap();
DiskEdit
perl
%map = {}
DiskEdit
groovy
def map = [:]
DiskEdit
groovy
Map map = new HashMap();
ExpandDiskEdit
scala
val map = mutable.Map.empty
ExpandDiskEdit
scala
val map = mutable.HashMap.empty[String, Int]
DiskEdit
python
map = {}
ExpandDiskEdit
cpp C++/CLI .NET 2.0
Hashtable^ hash = gcnew Hashtable;
ExpandDiskEdit
cpp C++/CLI .NET 2.0
Generic::Dictionary<String^, String^>^ dict = gcnew Generic::Dictionary<String^, String^>();
ExpandDiskEdit
cpp
std::map<int, std::string> m;
ExpandDiskEdit
fsharp
let map = Map.empty
ExpandDiskEdit
fsharp
let map = new Generic.Dictionary<string, string>()
ExpandDiskEdit
fsharp
let map = new Hashtable()
ExpandDiskEdit
erlang
Map = dict:new(),
ExpandDiskEdit
erlang
Map = orddict:new(),
ExpandDiskEdit
erlang
Map = gb_trees:empty(),
ExpandDiskEdit
erlang
Map = ets:new(the_map_name, [set, private, {keypos, 1}]),
ExpandDiskEdit
php
$map = array();
ExpandDiskEdit
php
$map = array("" => "");

Submit a new solution for ruby, java, perl, groovy ...