View Problem

Define an initial map

Define the map {circle:1, triangle:3, square:4}
DiskEdit
python
shapes = {'circle': 1, 'square': 4, 'triangle': 2}
DiskEdit
clojure
(def m '{circle 1 triangle 1 square 4})
ExpandDiskEdit
fsharp
let shapes = Map.ofList [("circle", 1); ("triangle", 3); ("square", 4)]
ExpandDiskEdit
fsharp
let shapes = Map.empty.Add("circle", 1).Add("triangle", 3).Add("square", 4)
ExpandDiskEdit
fsharp
let shapes = new Generic.Dictionary<string, int>()
shapes.Add("circle", 1)
shapes.Add("triangle", 3)
shapes.Add("square", 4)
DiskEdit
fsharp
let shapes = Map [("circle", 1); ("triangle", 3); ("square", 4)]
ExpandDiskEdit
fantom
map := ["circle":1, "triangle":2, "square":4]

Submit a new solution for python, clojure, fsharp, fantom ...
There are 26 other solutions in additional languages (cpp, erlang, go, groovy ...)