Elixir – Protocols
This topic is about Elixir - Protocols. Protocols are a mechanism to achieve polymorphism in Elixir. Dispatching on a protocol is available to any data type as long as it…
This topic is about Elixir - Protocols. Protocols are a mechanism to achieve polymorphism in Elixir. Dispatching on a protocol is available to any data type as long as it…
This topic is about Elixir - Structs. Structs are extensions built on top of maps that provide compile-time checks and default values. Defining Structs To define a struct, the defstruct…
This topic is about Elixir - Streams. Many functions expect an enumerable and return a list back. It means, while performing multiple operations with Enum, each operation is going to generate an…
This topic is about Elixir - Enumerables. An enumerable is an object that may be enumerated. "Enumerated" means to count off the members of a set/collection/category one by one (usually…
This topic is about Elixir - Loops. Due to immutability, loops in Elixir (as in any functional programming language) are written differently from imperative languages. For example, in an imperative…
This topic is about Elixir - Recursion. Recursion is a method where the solution to a problem depends on the solutions to smaller instances of the same problem. Most computer…
This topic is about Elixir - Functions. A function is a set of statements organized together to perform a specific task. Functions in programming work mostly like function in Math.…
This topic is about Elixir - Aliases. In order to facilitate software reuse, Elixir provides three directives – alias, require and import. It also provides a macro called use which is summarized below…
This topic is about Elixir - Modules. In Elixir, we group several functions into modules. We have already used different modules in the previous chapters such as the String module,…
this topic is about Elixir - Maps. Keyword lists are a convenient way to address content stored in lists by key, but underneath, Elixir is still walking through the list.…