Structs
August 22, 2023 1 minutes • 37 words
Table of contents
Structs
struct(Struct_name, map)
inserts a map into a Struct
Updating structs
# via struct
a = %Computer{id: 1, kind: "laptop"}
struct(a, kind: "server")
# via | cons
a = %{a | kind: "server"}
put_in
updates a struct