Records¶
Records are collections of data with named fields:
Updating a record¶
renamed = {...user, name: "Marvin"}
// -> {name: "Marvin", country: "CZ", legs: 2}
// `user` is unchanged
withArms = {...user, arms: 2}
// -> {name: "Martin", country: "CZ", legs: 2, arms: 2}
Getters¶
record |> .name // ==
.name(record) // ==
record.name
getter = .name
getter(user) // -> "Martin"
getter(renamed) // -> "Marvin"