by Example

Structs


Structure are similar to objects in other languages





defmodule Person do
  defstruct name: nil, age: 0
end

person = %Person{name: "Joe Doe", age: 21}


Next: Modules