on master help sign in
gall-guide: pokes - add ::'s to break up code
92d625cTinnus Napbus
content/docs/userspace/gall-guide/6-pokes.md+12
@@ -196,12 +196,15 @@ receiving pokes. Here's the first, an agent that receives pokes:
196|_ =bowl:gall
196|_ =bowl:gall
197+* this .
197+* this .
198 def ~(. (default-agent this %.n) bowl)
198 def ~(. (default-agent this %.n) bowl)
199+::
199++ on-init
200++ on-init
200 ^- (quip card _this)
201 ^- (quip card _this)
201 `this
202 `this
203+::
202++ on-save
204++ on-save
203 ^- vase
205 ^- vase
204 !>(state)
206 !>(state)
207+::
205++ on-load
208++ on-load
206 |= old-state=vase
209 |= old-state=vase
207 ^- (quip card _this)
210 ^- (quip card _this)
@@ -209,6 +212,7 @@ receiving pokes. Here's the first, an agent that receives pokes:
209 ?- -.old
212 ?- -.old
210 %0 `this(state old)
213 %0 `this(state old)
211 ==
214 ==
215+::
212++ on-poke
216++ on-poke
213 |= [=mark =vase]
217 |= [=mark =vase]
214 ^- (quip card _this)
218 ^- (quip card _this)
@@ -225,6 +229,7 @@ receiving pokes. Here's the first, an agent that receives pokes:
225 `this(val (dec val))
229 `this(val (dec val))
226 ==
230 ==
227 ==
231 ==
232+::
228++ on-watch on-watch:def
233++ on-watch on-watch:def
229++ on-leave on-leave:def
234++ on-leave on-leave:def
230++ on-peek on-peek:def
235++ on-peek on-peek:def
@@ -344,12 +349,15 @@ rather than updating its own state, it sends two pokes to `%pokeme`, so
344|_ =bowl:gall
349|_ =bowl:gall
345+* this .
350+* this .
346 def ~(. (default-agent this %.n) bowl)
351 def ~(. (default-agent this %.n) bowl)
352+::
347++ on-init
353++ on-init
348 ^- (quip card _this)
354 ^- (quip card _this)
349 `this
355 `this
356+::
350++ on-save
357++ on-save
351 ^- vase
358 ^- vase
352 !>(state)
359 !>(state)
360+::
353++ on-load
361++ on-load
354 |= old-state=vase
362 |= old-state=vase
355 ^- (quip card _this)
363 ^- (quip card _this)
@@ -357,6 +365,7 @@ rather than updating its own state, it sends two pokes to `%pokeme`, so
357 ?- -.old
365 ?- -.old
358 %0 `this(state old)
366 %0 `this(state old)
359 ==
367 ==
368+::
360++ on-poke
369++ on-poke
361 |= [=mark =vase]
370 |= [=mark =vase]
362 ^- (quip card _this)
371 ^- (quip card _this)
@@ -377,9 +386,11 @@ rather than updating its own state, it sends two pokes to `%pokeme`, so
377 ==
386 ==
378 ==
387 ==
379 ==
388 ==
389+::
380++ on-watch on-watch:def
390++ on-watch on-watch:def
381++ on-leave on-leave:def
391++ on-leave on-leave:def
382++ on-peek on-peek:def
392++ on-peek on-peek:def
393+::
383++ on-agent
394++ on-agent
384 |= [=wire =sign:agent:gall]
395 |= [=wire =sign:agent:gall]
385 ^- (quip card _this)
396 ^- (quip card _this)
@@ -402,6 +413,7 @@ rather than updating its own state, it sends two pokes to `%pokeme`, so
402 %- (slog '%pokeit: Decrement poke failed!' ~)
413 %- (slog '%pokeit: Decrement poke failed!' ~)
403 `this
414 `this
404 ==
415 ==
416+::
405++ on-arvo on-arvo:def
417++ on-arvo on-arvo:def
406++ on-fail on-fail:def
418++ on-fail on-fail:def
407--
419--