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
About the Author
About the Reviewers

Chapter 4. Modules and Functions

This chapter will cover the following recipes:

  • Namespacing modules

  • Using module attributes as constants

  • Enforcing behaviors

  • Documenting modules

  • Using module directives

  • Using a module in the scripted mode

  • Defining functions with default arguments

  • Using guard clauses and pattern matching in function definitions