Values never change
Every value is immutable. Passing a value to a function or returning it never
lets anyone else change it. A local declared with var mut can be pointed at a
new value of the same type, but fields cannot be assigned: to change an object,
build a new one.
type Product = Object { name: ProductName stock: Stock}function restock(product: Product, stock: Stock) -> Product { return Product { name: product.name stock: stock }}
Markdown for agents: /docs/values-never-change.md.Built from Jadpo main at a707efb.