One nice way of turning a map or keyword list into an existing struct is to use
`struct/2` or `struct!/2`.
- `struct/2` will drop any attributes that are not part of the struct
- `struct!/2` will raise an error if there are attributes that are not part of
the struct
But not only can they create structs, they can also update them!
For more videos like this, check out www.elixirstreams.com/
17 июл 2023