Protocols and Structs
Understand the protocols and structs in Elixir.
We'll cover the following...
Elixir doesn’t have classes, but perhaps surprisingly it does have user-defined types. It pulls this off using structs and a few conventions.
Example
Let’s play with a simple struct. Here’s the definition:
defmodule Blob do
defstruct content: nil
end
And ...