recipes · recipe ·
Know what your action changes
Make changes to shared collections intentional.
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.
start.yhStatus: complete-program
Know what your action changes
Make changes to shared collections intentional.
cpu · type checked
AddSnack(list of text original basket, text snack)
{
basket.Add(snack)
}
list of text picnic = []
AddSnack(picnic, "berry")
Console.Log(Text.From(picnic.count))project.mech
manifestVersion = "2"
package = "api.example.recipe__ownership"
version = "0.1.0"
languageEdition = "yeho-core-2026.1"
[app]
kind = "headless"
Expected output
1
Notes and source
Call AddSnack twice with different foods, then print the collection with a for loop.
demonhunterlabs/app/lib/yeho-walkthrough.ts