The defp macro defines a private function—one that can be called only within the module that declares it.
You can define private functions with multiple heads, just as you can with def. However, you cannot have some heads private and others public. That is, the following code is not valid:
def fun(a) when is_list(a), do: true
defp fun(a), do: false