我目前正在学习长生不老药,我正在尝试打印函数及其数量
print = fn ({function , arity}) ->
IO.puts "#{function}/#{arity}"
end
Enum.__info__(:functions) |> Enum.each(print.())
这返回
** (BadArityError) #Function<0.60149952 in file:learn.exs> with arity 1 called with no arguments
learn.exs:5: (file)
(elixir) lib/code.ex:767: Code.require_file/2