Accessing protected functions

Im trying to understand creating and accessing protected functions.
I have following simple code, but I’m getting error
Im trying to call public function which in turn calls inside a protected function. What is going wrong here?

defmodule Math do

    def add(a,b) do
        c = a+b,b,"add", c)

    defp info(a,b,c,d) do
        cond do
            c == "add" -> IO.puts "Adding #{a} and #{b}, result = #{d}" 



Error received

== Compilation error in file math.ex ==
** (UndefinedFunctionError) function is undefined or private, 2, "add", 3)
    (elixir 1.10.4) lib/kernel/parallel_compiler.ex:304: anonymous fn/4 in Kernel.ParallelCompiler.spawn_workers/7

Private functions must be called without the name of the module. Replace with info(...).

1 Like

Thank you!
Quite silly not to realize it myself. I was following Elixir guide but did not notice it.

Note the terminology, these are private functions. Elixir has no notion of protected functions, which is I guess mostly an OOP thing.