Elixir, as a functional programming language, normally follows declarative programming paradigm instead of imperative.
By defining lots of small independent functions and use some tools Elixir provides us, we will use less of control flow constructions comparing to other languages. Well, maybe comparing to imperative languages.
Let’s talk a little bit more about Maps. I’ve already covered basics in the one of my previous articles.
Now it is time to go deeper and discover how we can update Maps and add new items to it.
Have you ever worked on the project which contains no documentation?
Did you have the desire to add documentation but didn’t know where to start?
Well, now we can check how we can do that in Elixir and see how powerful that functionality is.
Last time we were talking about functions I have mentioned that named functions are living inside modules.
Modules provide the namespace for functions and other things defined inside.
Usually grouped by same meaning.
Once you start developing any program besides the very simple one you will absolutely start structuring your code in subroutines.
In the Object Oriented Programming, they called methods. But as soon as Elixir is a functional programming language, subroutines here are functions. Let’s take a look what functions can give us.