From 279f17ac0e1b3d019c2b294098e834d249376686 Mon Sep 17 00:00:00 2001 From: David Thompson Date: Tue, 4 Jun 2019 20:49:16 -0400 Subject: Update chickadee manual. --- manuals/chickadee/Agendas.html | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) (limited to 'manuals/chickadee/Agendas.html') diff --git a/manuals/chickadee/Agendas.html b/manuals/chickadee/Agendas.html index eced92c..3580ade 100644 --- a/manuals/chickadee/Agendas.html +++ b/manuals/chickadee/Agendas.html @@ -1,6 +1,6 @@ - @@ -115,11 +117,12 @@ the current time. This is where after comes in handy:

Time units in the agenda are in no way connected to real time. It’s up to the programmer to decide what agenda time means. A simple and -effective approach is to map each call of the update hook +effective approach is to map each call of the update procedure (see Kernel) to 1 unit of agenda time, like so:

-
(add-hook! update-hook (lambda (dt) (update-agenda 1)))
+
(define (update dt)
+  (update-agenda 1))
 

It is important to call update-agenda periodically, otherwise @@ -147,19 +150,19 @@ scoped and can be changed using the with-agenda special form:

-
Procedure: agenda? obj
+
Procedure: agenda? obj

Return #t if obj is an agenda.

Procedure: current-agenda
-
Procedure: current-agenda agenda
+
Procedure: current-agenda agenda

When called with no arguments, return the current agenda. When called with one argument, set the current agenda to agenda.

-
Syntax: with-agenda agenda body
+
Syntax: with-agenda agenda body …

Evaluate body with the current agenda set to agenda.

@@ -169,42 +172,42 @@ with one argument, set the current agenda to agenda.

-
Procedure: update-agenda dt
+
Procedure: update-agenda dt

Advance the current agenda by dt.

-
Procedure: schedule-at time thunk
+
Procedure: schedule-at time thunk

Schedule thunk, a procedure of zero arguments, to be run at time.

-
Procedure: schedule-after delay thunk
+
Procedure: schedule-after delay thunk

Schedule thunk, a procedure of zero arguments, to be run after delay.

-
Procedure: schedule-every interval thunk [n]
+
Procedure: schedule-every interval thunk [n]

Schedule thunk, a procedure of zero arguments, to be run every interval amount of time. Repeat this n times, or indefinitely if not specified.

-
Syntax: at time body
+
Syntax: at time body …

Schedule body to be evaluated at time.

-
Syntax: after delay body
+
Syntax: after delay body …

Schedule body to be evaluated after delay.

-
Syntax: every interval body
-
Syntax: every (interval n) body
+
Syntax: every interval body …
+
Syntax: every (interval n) body …

Schedule body to be evaluated every interval amount of time. Repeat this n times, or indefinitely if not specified.

-- cgit v1.2.3