Why are there two kinds of functions in Elixir?
Just to clarify the naming, they are both functions. One is a named function and the other is an anonymous one. But you are right, they work somewhat differently and I am going to illustrate why they work like that. Let’s start with the second, fn. fn is a closure, similar to a lambda in … Read more