-
Notifications
You must be signed in to change notification settings - Fork 35
Open
Description
Structs are, simply put, maps with one extra key: a :struct key. We can even define a map ourselves with such a key to prove this:
iex> %{struct: Person, first_name: "Izzy", last_name: "Bell", birthday: ~D[1987-12-04], location: "home"}
%Person{
birthday: ~D[1987-12-04],
first_name: "Izzy",
last_name: "Bell",
location: ""
}
Structs are maps at heart!
In this part, location should be location: "home"
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels