@@ -329,7 +329,7 @@ created. Therefore, it will eventually be useful for you to know
329329syntax] ( https://www.ee.columbia.edu/~shane/projects/sensornet/part1.pdf ) .
330330
331331These are all implemented in ` main.tcl ` . For most things, you'll
332- probably only need ` Wish ` , ` Claim ` , ` When ` , and maybe ` Commit ` .
332+ probably only need ` Wish ` , ` Claim ` , ` When ` , and maybe ` Hold ` .
333333
334334### Wish and Claim
335335
@@ -428,25 +428,25 @@ cool`.
428428first-class object. You can use ` & ` joins in that pattern as
429429well.)
430430
431- ### Commit
431+ ### Hold
432432
433- Experimental: ` Commit ` is used to register claims that will stick
434- around until you do another ` Commit ` . You can use this to create the
433+ Experimental: ` Hold ` is used to register claims that will stick
434+ around until you do another ` Hold ` . You can use this to create the
435435equivalent of 'variables', stateful statements.
436436
437437```
438- Commit { Claim $this has a ball at x 100 y 100 }
438+ Hold { Claim $this has a ball at x 100 y 100 }
439439
440440When $this has a ball at x /x/ y /y/ {
441441 puts "ball at $x $y"
442442 After 10 milliseconds {
443- Commit { Claim $this has a ball at x $x y [expr {$y+1}] }
443+ Hold { Claim $this has a ball at x $x y [expr {$y+1}] }
444444 if {$y > 115} { set ::done true }
445445 }
446446}
447447```
448448
449- ` Commit ` will overwrite all statements made by the previous ` Commit `
449+ ` Hold ` will overwrite all statements made by the previous ` Hold `
450450(scoped to the current ` $this ` ).
451451
452452** Notice that you should scope your claim: it's ` $this has a ball ` , not `there
@@ -459,13 +459,13 @@ If you want multiple state atoms, you can also provide a key -- you
459459can be like
460460
461461```
462- Commit ball position {
462+ Hold ball position {
463463 Claim $this has a ball at blahblah
464464}
465465```
466466
467- and then future commits with that key, ` ball position ` , will
468- overwrite this statement but not override different commits with
467+ and then future holds with that key, ` ball position ` , will
468+ overwrite this statement but not override different holds with
469469different keys
470470
471471(there's currently no way to overwrite state from other pages, but we
@@ -475,24 +475,24 @@ that if it was useful.)
475475### Every time
476476
477477Experimental: ` Every time ` works almost like ` When ` , but it's used to
478- commit when an 'event' happens without causing a reaction cascade.
478+ hold when an 'event' happens without causing a reaction cascade.
479479
480480** You can't make Claims, Whens, or Wishes inside an ` Every time `
481- block. You can only Commit .**
481+ block. You can only Hold .**
482482
483483Example:
484484
485485```
486- Commit { Claim $this has seen 0 boops }
486+ Hold { Claim $this has seen 0 boops }
487487
488488Every time there is a boop & $this has seen /n/ boops {
489- Commit { Claim $this has seen [expr {$n + 1}] boops }
489+ Hold { Claim $this has seen [expr {$n + 1}] boops }
490490}
491491```
492492
493493If you had used ` When ` here, it wouldn't terminate, since the new
494- ` $this has seen n+1 boops ` commit would cause the ` When ` to retrigger,
495- resulting in a ` $this has seen n+2 boops ` commit , then another
494+ ` $this has seen n+1 boops ` hold would cause the ` When ` to retrigger,
495+ resulting in a ` $this has seen n+2 boops ` hold , then another
496496retrigger, and so on.
497497
498498` Every time ` , in contrast, will 'only react once' to the boop; nothing
0 commit comments