Book Image

Elixir Cookbook

By : Paulo Pereira
Book Image

Elixir Cookbook

By: Paulo Pereira

Overview of this book

Table of Contents (16 chapters)
Elixir Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Introduction


Elixir modules are files (see the following information box) where related functions are grouped and stored. In Chapter 1, Command Line, we covered how to load and compile our own modules in IEx and how to generate applications with Mix. Mix applications are a collection of modules within a predefined directory structure.

Modules are defined using the defmodule macro and functions using the def and defp macros.

Note

In this chapter, we will be developing some concepts that are specifically related to modules and functions. It is also possible to define modules inside IEx without storing them to files.