Walt Stoneburner's Ramblings

Currating Chaos

(Elixir) iex: load vs reload

In Elixir's REPL, IEx, if you want to load a file use:

iex> import_file("relative/path/to/file.ex")

This is just as if you typed the contents of the file at the shell.

If, however, the module is already loaded, you can reload and recompile the module by name:

iex> r SomeModule

This function is meant for development and debugging purposes.