Erlang Functions

When programming Erlang, you should think like you are writing an English essay. In Erlang, functions are not very different to what a traditional programming language offers, but they are written very differently in Erlang. To declare a function in the Erlang Repl, you will have to use the fun keyword. Name = fun(X) -> X. The above code will store the the declaration of a function called Name and would receive an argument called X....

June 21, 2021 · 3 min · Aleem Isiaka

Erlang Pattern Matching

If you come from a conventional programming language background, the way Erlang handles assignment is expected to look wonky, but it is not. There is nothing like an assignment in Erlang programming language; there is a different approach to accessing values in memory, which is the pattern-matching operations. With Java, PHP, Python, C, C++, and likes, the = symbol implies take the values from the right, and store it into the memory, then give me the reference of the location in memory and store it in the expression at the left....

June 15, 2021 · 4 min · Aleem Isiaka