CONTROL ENTERS HERE
02IA program is a leaf. The petiole is the entry; the apex is the return. Between them, every line of code is a vein.
enter(input) → leaf
03I
Read at the pace of breathing. The codex will wait. Each cell is closed; each chapter folds back upon itself.
// pause is also computation
04I
Bamboo grows by node. Iteration grows by step. Each segment is a turn of the loop — identical, repeatable, complete.
02IIfor (let i = 0; i < n; i++) {
step(i);
}
03II
A node closes the previous segment and opens the next. The condition is a knot. The increment is the next stalk.
04IIwhile (cond) {
body();
advance();
}
05II
SEGMENT BY SEGMENT
06IIWhen the stalk hollows, control runs through it cleanly. The body is the work; the head and the tail are merely punctuation.
07IIfor (item of grove) {
cut(item);
}
08II
A ginkgo divides at the petiole. The left half is one truth; the right is another. Both leaves share a stem.
01IIIif (light) {
drift("left");
}
02III
The condition is the wind that decides which half lights up. Predicates choose; they do not invent.
03IIIelse {
drift("right");
}
04III
ONE STEM · TWO LEAVES
05IIIBranches are not opposites; they are siblings. The same petiole, the same leaf, two destinations.
06IIIfunction factorial(n) {
if (n <= 1) return 1;
return n * factorial(n - 1);
}
02IV
A fern remembers its own shape at every scale. Recursion is the same shape, met again, smaller, until the smallest version returns the answer.
03IVSELF AT EVERY SCALE
04IVThe base case is the smallest pinna — the leaflet that does not divide. Without it, the frond unrolls forever.
if (n <= 1) return 1;
05IV
async threadA() {
await draw(needle);
}
01VA
Two needles share one fascicle. They run in parallel, brushed by the same wind, but they do not become each other.
02VAPAIRED · NEVER FUSED
03VAasync threadB() {
await draw(needle);
}
04VB
A lock is the small enso that embraces a needle — for the duration of one breath, only one thread passes through it.
05VBawait Promise.all([
threadA(), threadB()
]);
06VB
const f = (x) => x;
// no global state
centerVI
A pure function is a lotus — the same input always produces the same output. There is no mud at the petal's edge.
function tail(n, acc) {
if (n === 0) return acc;
return tail(n - 1, acc * n);
}
02VII
EXIT VIA LOOPHOLE
03VIIThe tea-leaf curls so its tip rejoins its own petiole. The loop is closed; the hole is the way out. Tail-call — a circle with a single opening.
04VII