How do you extend/inherit an elixir module?
<p>Let's say an elixir library defines:</p>

<pre><code>defmodule Decoder do

  def decode(%{"BOOL" =&gt; true}),    do: true
  def decode(%{"BOOL" =&gt; false}),   do: false
  def decode(%{"BOOL" =&gt; "true"}),  do: true
  def decode(%{"BOOL" =&gt; "false"}), do: false
  def decode(%{"B" =&gt; value}),      do: value
  def decode(%{"S" =&gt; value}),      do: value
  def decode(%{"M" =&gt; value}),      do: value |&gt; decode
  def decode(item = %{}) do
    item |&gt; Enum.reduce(%{}, fn({k, v}, map) -&gt;
      Map.put(map, k, decode(v))
    end)
  end
end
</code></pre>

<p>I want to define a module <code>MyDecoder</code> which just adds one more <code>def decode</code> to the above module.  In an oo language, this would be done by inheritance/mixin/extends of some sort.</p>

<p>How do I do this in elixir?</p>