Closed 7006 closed 8 months ago
I've copied Erlang version of function sum/2 from https://elixir-lang.org/crash-course.html#identifying-functions, compiled and run it in the Erlang shell
The "a" in Erlang is actually a list(yep it's weird) so we fall into the 2nd clause of sum/2 function
So we should use binary syntax in order to fall into the 3rd clause of function
Thanks @7006! 💟
I've copied Erlang version of function sum/2 from https://elixir-lang.org/crash-course.html#identifying-functions, compiled and run it in the Erlang shell
The "a" in Erlang is actually a list(yep it's weird) so we fall into the 2nd clause of sum/2 function
So we should use binary syntax in order to fall into the 3rd clause of function