Elixir Language Delegating functions to another module


Example

Use defdelegate to define functions that delegate to functions of the same name defined in another module:

defmodule Math do
  defdelegate pi, to: :math
end


iex> Math.pi
3.141592653589793