- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMaps.ex
More file actions
Latest commit
16 lines (12 loc) · 434 Bytes
/
Copy pathMaps.ex
File metadata and controls
16 lines (12 loc) · 434 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
defmoduleMapsdo
defmaindo
do_stuff()
end
defdo_stuffdo
capitals=%{"Alabama"=>"Montgomery","India"=>"New Delhi","USA"=>"Washington"}
IO.puts("Capital of India is #{capitals["India"]}")
capitals2=%{alabama: "Montgomery",india: "New Delhi",usa: "Washington"}
IO.puts("Capital of India is #{capitals2.india}")
capitals3=Dict.put_new(capitals,"New Zealand","Wellington")
end
end