From Elixir’s documentation on functions within modules:
Inside a module, we can define functions with
def/2
and private functions withdefp/2
. A function defined withdef/2
can be invoked from other modules while a private function can only be invoked locally.
So defp
defines a private function.