Guest User

Untitled

a guest
Jun 22nd, 2018
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. defmodule TestCode do
  2. def hello() do
  3. a = [foo: "bar", hello: "world", hello: "test"]
  4. m = %{:foo => "hoge", "hoge" => "bar"}
  5. IO.inspect a
  6. IO.inspect m[m.foo]
  7. m2 = %{m | :foo => "hhhh"}
  8. IO.inspect m.foo
  9. IO.inspect m2.foo
  10.  
  11. enum_functions = Enum.__info__(:functions)
  12. IO.inspect(enum_functions)
  13. Enum.__info__(:functions) |> Enum.each(fn({function, arity}) -> IO.puts "#{function}/#{arity}" end)
  14. end
  15. end
  16.  
  17. TestCode.hello()
Add Comment
Please, Sign In to add comment