How to Find Full Function Name in Elixir

Sometimes you want to know the full name of an imported function, including the name of the module it is defined in.

Capture the function name with & and pass it to IO.inspect/1 to reveal its full name.

Another way is to rummage through __ENV__.functions/0 which lists all the modules and functions loaded into your compile time environment. Information about __ENV__ can be found here.

Here’s an example.

Don’t Import or Alias Too Many Modules

If you find yourself needing to do that, you’ve probably imported or aliased too many modules. It’d be best to avoid getting into such a situation by splitting modules accordingly.