We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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"
The text was updated successfully, but these errors were encountered:
No branches or pull requests
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"
The text was updated successfully, but these errors were encountered: