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

Chapter 2. Data Types and Structures

This chapter will cover the following recipes:

  • Understanding immutability

  • Adding and subtracting lists

  • Combining tuples into a list

  • Creating and manipulating keyword lists

  • Using pattern matching

  • Pattern matching an HTTPoison response

  • Creating a key/value store with a map

  • Mapping and reducing enumerables

  • Generating lazy (even infinite) sequences

  • Streaming a file as a resource