This blog has moved. Please now refer to this article by using this link. TD;DR A package is available on hex.pm and GitHub. In Elixir, you can define a struct by calling defstruct in a module. This macro takes a list of atoms which becomes the keys of the struct, or a keyword list associating these keys to default values: defstruct name: "John Smith", age: nil, phone: nilAll the keys are optional