Destructuring
Pull structured values into named bindings.
Read several values at once
Destructuring reads a structured source once and binds selected pieces outward. Arrays, tuples, maps, and tensors can all be patterns.
The first two names receive 1 and 2; rest receives [3, 4]. The source is read once. Remove one item from the right and predict the new rest array.
Pull named entries from a map
Map patterns name the entries to extract. This result shows cash and the exact amount 7/2.
More advanced patterns can rename keys or pull values from tuples and shaped data. Shared ledger uses this map form together with cell updates.
Continue with Properties and metadata or Shared ledger.