I find it difficult to load a module into another module using the Elixir language.
For example, I have 2 files shown below:
a.ex
defmodule A do def a do IO.puts "Aa" end end
b.ex
defmodule B do require A def b do IO.puts "Bb" Aa end end Bb
I tried to execute b.ex. Then I got the error shown below:
$elixir b.ex ** (CompileError) b.ex:2: module A is not loaded and could not be found
source share