Pantrypoints Pantrypoints

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

Follow Us! →

We're creating a new Economic System from a new Economic Science! Please support us by leaving your email or leaving a comment above.