put
record →
put(
...assignments: entry
) → record
Creates or replaces statically named fields while preserving every other field. Assignment expressions are evaluated against the original input record.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
assignments | entry | Variadic (one or more) | One or more named assignments evaluated against the original input record. |
Argument evaluation
assignments: Each supplied expression is evaluated once against the value entering this call.
Examples
{name := "Alice", age := 41} | put(age := .age | add(1)) → {name := "Alice", age := 42}
Kind: Function
Scope: record
Aliases: None