{"id":"recipe--ownership","name":"Know what your action changes","owner":"yeho","package":"recipes","kind":"recipe","signature":"start.yh","description":"Make changes to shared collections intentional.","context":"We have used functions that calculate and return a new value. Now imagine an action whose job is to add something to the caller's existing list. That intent should be visible when you read its parameters. The original binding in this example asks to work with the caller's admitted source value. This is an experimental, type- and target-checked feature. It is not permission to alias every kind of value.","parameters":[],"returns":"","members":[],"tags":["cpu","recipe"],"updated":"2026-09-09","source":{"repository":"demonhunterlabs","path":"app/lib/yeho-walkthrough.ts"},"status":"complete-program","notes":["Call AddSnack twice with different foods, then print the collection with a for loop."],"examples":[{"id":"program","title":"Know what your action changes","description":"Make changes to shared collections intentional.","code":"AddSnack(list of text original basket, text snack)\n{\n    basket.Add(snack)\n}\n\nlist of text picnic = []\nAddSnack(picnic, \"berry\")\nConsole.Log(Text.From(picnic.count))","manifest":"manifestVersion = \"2\"\npackage = \"api.example.recipe__ownership\"\nversion = \"0.1.0\"\nlanguageEdition = \"yeho-core-2026.1\"\n\n[app]\nkind = \"headless\"\n","tags":["cpu"],"run":"cpu-oracle","expected":"1","verification":"type checked","sha256":"dce7676be71bc8e5003ea6aed99c05b352983befc3bf6d151afe2a518e504e3f","checked":"2026-09-09","diagnostic":"","observedOutput":null,"checkedBackend":null}],"searchTerms":[],"url":"https://demonhunterlabs.com/academy/api?item=recipe--ownership","json":"https://demonhunterlabs.com/reference/items/recipe--ownership.json","markdown":"https://demonhunterlabs.com/reference/text/recipe--ownership.md"}
