on master help sign in
Merge pull request #1311 from urbit/gall-guide-explain-a-plus-b

gall-guide: add explanation of a+b syntax in lifecycle.md

commit57fafc661bc0df3476987e81b84821dad1f17c3b authorpoprox <51337059+drbeefsupreme@users.noreply.github.com> dateTue 18 Jan 2022, 11:03 (5 years ago) parent6a614f0e6db5fa
1 file changed+12
content/docs/userspace/gall-guide/4-lifecycle.md+12
content/docs/userspace/gall-guide/4-lifecycle.md+12
@@ -445,6 +445,18 @@ new type - in this case by duplicating `val` and changing the head-tag from `%0`
445445to `%1`. This is an extremely simple state type transition function - it would
446446likely be more complicated for an agent with real functionality.
447447
448+Note: the `a+b` syntax (as in `1+[val.old val.old]`) forms a cell of the
449+constant `%a` and the noun `b`. The constant may either be an integer or a `@tas`.
450+For example:
451+
452+```
453+> foo+'bar'
454+[%foo 'bar']
455+
456+> 42+'bar'
457+[%42 'bar']
458+```
459+
448460Let's now use `dbug` to confirm our state has successfully been updated to the new
449461type:
450462