Initial data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 72d218235f
commit f23f22d71c
199087 changed files with 3378941 additions and 0 deletions

View file

@ -0,0 +1 @@
%{"one" => :two, 3 => "four"}

View file

@ -0,0 +1,3 @@
%{a: 1, b: 2}
# equivalent to
%{:a => 1, :b => 2}

View file

@ -0,0 +1,17 @@
defmodule RC do
def test_create do
IO.puts "< create Map.new >"
m = Map.new #=> creates an empty Map
m1 = Map.put(m,:foo,1)
m2 = Map.put(m1,:bar,2)
print_vals(m2)
print_vals(%{m2 | foo: 3})
end
defp print_vals(m) do
IO.inspect m
Enum.each(m, fn {k,v} -> IO.puts "#{inspect k} => #{v}" end)
end
end
RC.test_create