defmodule User do
defstruct name: nil , age: nil
end
iex(15)> %User{}
%User{age: nil, name: nil}
iex(16)> %User{} |> struct(age: 12)
%User{age: 12, name: nil}
iex(17)> %User{} |> struct(age: 21) |> struct(name: "dave")
%User{age: 21, name: "dave"}