Created
June 21, 2018 04:26
-
-
Save shiro01/1da160e5ef33940d33cf4fc8269037e0 to your computer and use it in GitHub Desktop.
elixir test code
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule TestCode do | |
def hello() do | |
a = [foo: "bar", hello: "world", hello: "test"] | |
m = %{:foo => "hoge", "hoge" => "bar"} | |
IO.inspect a | |
IO.inspect m[m.foo] | |
m2 = %{m | :foo => "hhhh"} | |
IO.inspect m.foo | |
IO.inspect m2.foo | |
enum_functions = Enum.__info__(:functions) | |
IO.inspect(enum_functions) | |
Enum.__info__(:functions) |> Enum.each(fn({function, arity}) -> IO.puts "#{function}/#{arity}" end) | |
end | |
end | |
TestCode.hello() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment