published: 28th of January 2021
A module is a collection of functions that can be used to organize your code in a manner similar to namespacing.
Modules are defined in Elixir with the defmodule keyword.
# Define a module
defmodule MyModule do
# Contents
end
# Define a nested helpers module
defmodule MyModule.Helpers do
# Contents
end
# Define module attributes
defmodule MyModule do
@some_attribute "some attribute value"
# Contents
end
https://elixir-lang.org/crash-course.html#modules
https://learning.oreilly.com/library/view/elixir-in-action/9781617295027/c02.xhtml