# add

Add a planned item

Last updated: 2026-09-09

Package: language | Status: generated-cpp-only

Tags: boundaries, cpu, keyword, language, yeho

For Kyber-ready code, collect intended changes separately and apply them after the loop.

```yh
add
```


## Complete program

Queue a structural collection edit while reading the original iteration snapshot.

Verification: type checked

```yh
list of int scores = [10, -1, 20]
for score at index in scores
{
    if score < 0 { plan add 5 }
}
for score in scores { Console.Log(Text.From(score)) }

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.word__add"
version = "0.1.0"
languageEdition = "yeho-core-2026.1"

[app]
kind = "headless"

```

Extract the example archive beside the yeho and dolphin checkouts. This example requires those source dependencies and a current developer compiler.

```sh
./yeho/build/dolphin-metal/yehoc ./api-examples/word--add/2 --backend cpu-oracle -o /tmp/yeho-example
/tmp/yeho-example
```


Planned loop mutation is generated-C++ only.

The explicit two-phase alternative is easy to inspect and portable across current targets.

Source: yeho/conformance-2026.1.json: planned-loop-mutations; parser_statements.cpp

AI training permission: https://demonhunterlabs.com/ai-use
