I'm having hard time to load a module into another module using Elixir language.
For example, I have 2 files shown below:
a.ex
defmodule A do
def a do
IO.puts "A.a"
end
end
b.ex
defmodule B do
require A
def b do
IO.puts "B.b"
A.a
end
end
B.b
I tried to execute b.ex. Then I got error shown below:
$elixir b.ex
** (CompileError) b.ex:2: module A is not loaded and could not be found