View Problem

Define an unmodifiable empty map

DiskEdit
ruby
map = {}.freeze
ExpandDiskEdit
fantom
map := [:].ro
DiskEdit
clojure
; Clojure maps are immutable
(def m {})
DiskEdit
groovy
empty = Collections.EMPTY_MAP
DiskEdit
groovy
map = [:].asImmutable()
ExpandDiskEdit
groovy with commons collections
def empty = MapUtils.EMPTY_SORTED_MAP
ExpandDiskEdit
groovy with google collections
def empty = ImmutableMap.of()

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