將功能委託給另一個模組

使用 defdelegate 定義委託給另一個模組中定義的同名函式的函式:

defmodule Math do
  defdelegate pi, to: :math
end

iex> Math.pi
3.141592653589793